From 568e7a5ca49db1b0808bf0100532e4b0b047c48b Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Fri, 24 Dec 2021 17:38:57 +0100 Subject: [PATCH] check if player is temporary --- .../listeners/protocollib/PacketCommandSendListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/protocollib/PacketCommandSendListener.java b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/protocollib/PacketCommandSendListener.java index 97f57de..ff2b808 100644 --- a/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/protocollib/PacketCommandSendListener.java +++ b/CommandWhitelistBukkit/src/main/java/eu/endermite/commandwhitelist/bukkit/listeners/protocollib/PacketCommandSendListener.java @@ -27,8 +27,7 @@ public static void commandSendListener(ProtocolManager protocolManager, Plugin p @Override public void onPacketSending(PacketEvent event) { Player player = event.getPlayer(); - if (player.hasPermission(CWPermission.BYPASS.permission())) return; - + if (!event.isPlayerTemporary() && player.hasPermission(CWPermission.BYPASS.permission())) return; HashSet commandList = CommandWhitelistBukkit.getCommands(player); PacketContainer packet = event.getPacket(); RootCommandNode node = (RootCommandNode) packet.getModifier().getValues().get(0);