From f854342c1b855c018c546a27e20c3cbe69c4aacf Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 29 Nov 2017 23:36:31 -0500 Subject: [PATCH] Fix AsyncTabCompleteEvent not setting isCommand --- Spigot-Server-Patches/AsyncTabCompleteEvent.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch index d96134cac0..1a9987c27d 100644 --- a/Spigot-Server-Patches/AsyncTabCompleteEvent.patch +++ b/Spigot-Server-Patches/AsyncTabCompleteEvent.patch @@ -14,7 +14,7 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 5a620f3fd..35774f8bf 100644 +index 5a620f3fd..ead0994f8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -41,7 +41,7 @@ index 5a620f3fd..35774f8bf 100644 + java.util.List completions = new ArrayList<>(); + BlockPosition blockpos = packet.b(); + String buffer = packet.a(); -+ boolean isCommand = packet.c(); ++ boolean isCommand = buffer.startsWith("/") || packet.c(); + event = new com.destroystokyo.paper.event.server.AsyncTabCompleteEvent(this.getPlayer(), completions, + buffer, isCommand, blockpos != null ? MCUtil.toLocation(player.world, blockpos) : null); + event.callEvent();