From 7222b910e5b16e66108c6a160f46241b2a5e2a59 Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Sun, 14 Jul 2024 14:20:37 +0200 Subject: [PATCH] mini cleanup --- .../commandwhitelist/bukkit/CommandWhitelistBukkit.java | 2 +- .../bukkit/listeners/PlayerCommandPreProcessListener.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/CommandWhitelistBukkit.java b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/CommandWhitelistBukkit.java index ec2a89f..20dc7bb 100644 --- a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/CommandWhitelistBukkit.java +++ b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/CommandWhitelistBukkit.java @@ -122,7 +122,7 @@ else if (player.hasPermission(s.getValue().getPermission())) * @param player Bukkit Player * @return subcommands unavailable for the player */ - public static HashSet getSuggestions(org.bukkit.entity.Player player) { + public static HashSet getSuggestions(Player player) { HashSet suggestionList = new HashSet<>(); HashMap groups = configCache.getGroupList(); for (Map.Entry s : groups.entrySet()) { diff --git a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/PlayerCommandPreProcessListener.java b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/PlayerCommandPreProcessListener.java index bd8b253..b81410e 100644 --- a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/PlayerCommandPreProcessListener.java +++ b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/PlayerCommandPreProcessListener.java @@ -11,12 +11,13 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; +import org.bukkit.event.player.PlayerCommandPreprocessEvent; import java.util.HashSet; public class PlayerCommandPreProcessListener implements Listener { @EventHandler(priority = EventPriority.LOWEST) - public void PlayerCommandSendEvent(org.bukkit.event.player.PlayerCommandPreprocessEvent event) { + public void PlayerExecuteCommand(PlayerCommandPreprocessEvent event) { Player player = event.getPlayer(); if (player.hasPermission(CWPermission.BYPASS.permission())) return; String caseSensitiveLabel = CommandUtil.getCommandLabel(event.getMessage());