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> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version> <version>2.2.4</version>
</parent> </parent>
<artifactId>Bukkit</artifactId> <artifactId>Bukkit</artifactId>
@@ -27,7 +27,8 @@ public class PacketCommandSendListener {
@Override @Override
public void onPacketSending(PacketEvent event) { public void onPacketSending(PacketEvent event) {
Player player = event.getPlayer(); 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); 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);
+1 -1
View File
@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version> <version>2.2.4</version>
</parent> </parent>
<artifactId>Common</artifactId> <artifactId>Common</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version> <version>2.2.4</version>
</parent> </parent>
<artifactId>Velocity</artifactId> <artifactId>Velocity</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<parent> <parent>
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version> <version>2.2.4</version>
</parent> </parent>
<artifactId>Waterfall</artifactId> <artifactId>Waterfall</artifactId>
+1 -1
View File
@@ -6,7 +6,7 @@
<groupId>eu.endermite.commandwhitelist</groupId> <groupId>eu.endermite.commandwhitelist</groupId>
<artifactId>CommandWhitelist</artifactId> <artifactId>CommandWhitelist</artifactId>
<version>2.2.3</version> <version>2.2.4</version>
<modules> <modules>
<module>CommandWhitelistCommon</module> <module>CommandWhitelistCommon</module>
<module>CommandWhitelistBukkit</module> <module>CommandWhitelistBukkit</module>