Skip to content

Commit

Permalink
fix: properly override setInvalidCommandUseHandler in AlpineCore plug…
Browse files Browse the repository at this point in the history
…in class
  • Loading branch information
BestBearr committed Dec 11, 2024
1 parent 8566809 commit 0263967
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/co/crystaldev/alpinecore/AlpineCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
import co.crystaldev.alpinecore.framework.teleport.AlpineTeleportHandler;
import dev.rollczi.litecommands.invalidusage.InvalidUsageHandler;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.event.EventHandler;
import org.bukkit.event.server.PluginDisableEvent;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.HashSet;
Expand All @@ -37,7 +37,7 @@ public final class AlpineCore extends AlpinePlugin {

private final Map<AlpinePlugin, Set<AlpineArgumentResolver<?>>> argumentResolvers = new HashMap<>();

@Getter @Setter
@Getter
private InvalidUsageHandler<CommandSender> invalidCommandUsageHandler;

@Override
Expand Down Expand Up @@ -72,4 +72,9 @@ public void forEachResolver(@NotNull Consumer<AlpineArgumentResolver> resolverCo
resolvers.forEach(resolverConsumer);
});
}

@Override
public void setInvalidCommandUseHandler(@Nullable InvalidUsageHandler<CommandSender> handler) {
this.invalidCommandUsageHandler = handler;
}
}

0 comments on commit 0263967

Please sign in to comment.