Fix AsyncTabCompleteEvent not setting isCommand
This commit is contained in:
@@ -14,7 +14,7 @@ completion, such as offline players.
|
|||||||
Also adds isCommand and getLocation to the sync TabCompleteEvent
|
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
|
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
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/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 {
|
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||||
@@ -41,7 +41,7 @@ index 5a620f3fd..35774f8bf 100644
|
|||||||
+ java.util.List<String> completions = new ArrayList<>();
|
+ java.util.List<String> completions = new ArrayList<>();
|
||||||
+ BlockPosition blockpos = packet.b();
|
+ BlockPosition blockpos = packet.b();
|
||||||
+ String buffer = packet.a();
|
+ 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,
|
+ event = new com.destroystokyo.paper.event.server.AsyncTabCompleteEvent(this.getPlayer(), completions,
|
||||||
+ buffer, isCommand, blockpos != null ? MCUtil.toLocation(player.world, blockpos) : null);
|
+ buffer, isCommand, blockpos != null ? MCUtil.toLocation(player.world, blockpos) : null);
|
||||||
+ event.callEvent();
|
+ event.callEvent();
|
||||||
|
|||||||
Reference in New Issue
Block a user