Skip to content

Commit

Permalink
check if player is temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
YouHaveTrouble committed Dec 24, 2021
1 parent 7cb94cc commit 568e7a5
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> commandList = CommandWhitelistBukkit.getCommands(player);
PacketContainer packet = event.getPacket();
RootCommandNode<?> node = (RootCommandNode<?>) packet.getModifier().getValues().get(0);
Expand Down

0 comments on commit 568e7a5

Please sign in to comment.