do not handle temporary players

This commit is contained in:
2022-02-07 18:10:23 +01:00
parent 5dc67e0122
commit 9f1beac562
6 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
</parent>
<artifactId>Bukkit</artifactId>
@@ -27,7 +27,8 @@ public class PacketCommandSendListener {
@Override
public void onPacketSending(PacketEvent event) {
Player player = event.getPlayer();
if (!event.isPlayerTemporary() && player.hasPermission(CWPermission.BYPASS.permission())) return;
if (event.isPlayerTemporary()) return;
if (player.hasPermission(CWPermission.BYPASS.permission())) return;
HashSet<String> commandList = CommandWhitelistBukkit.getCommands(player);
PacketContainer packet = event.getPacket();
RootCommandNode<?> node = (RootCommandNode<?>) packet.getModifier().getValues().get(0);
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
</parent>
<artifactId>Common</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
</parent>
<artifactId>Velocity</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
</parent>
<artifactId>Waterfall</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version>
<version>2.2.4</version>
<modules>
<module>CommandWhitelistCommon</module>
<module>CommandWhitelistBukkit</module>