check if player is temporary

This commit is contained in:
2021-12-24 17:38:57 +01:00
parent 7cb94cce4b
commit 568e7a5ca4
@@ -27,8 +27,7 @@ public class PacketCommandSendListener {
@Override @Override
public void onPacketSending(PacketEvent event) { public void onPacketSending(PacketEvent event) {
Player player = event.getPlayer(); 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); HashSet<String> commandList = CommandWhitelistBukkit.getCommands(player);
PacketContainer packet = event.getPacket(); PacketContainer packet = event.getPacket();
RootCommandNode<?> node = (RootCommandNode<?>) packet.getModifier().getValues().get(0); RootCommandNode<?> node = (RootCommandNode<?>) packet.getModifier().getValues().get(0);