3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Return after sending empty commands (#5586)

Dieser Commit ist enthalten in:
Jason 2021-05-06 16:25:29 -07:00 committet von GitHub
Ursprung 2a67a9e512
Commit 8fcef3c1f6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -5,17 +5,20 @@ Subject: [PATCH] Send empty commands if tab completion is disabled
diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java
index 988d1c9e9f4f29325043eb083123d12dd5f8081d..87ddccc0808189cb80bef9d2c9eced362d025140 100644 index 988d1c9e9f4f29325043eb083123d12dd5f8081d..29a395e69aab9c50a45c5fd5ab8795fd8e3ef727 100644
--- a/src/main/java/net/minecraft/commands/CommandDispatcher.java --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java
@@ -326,7 +326,9 @@ public class CommandDispatcher { @@ -326,7 +326,12 @@ public class CommandDispatcher {
} }
public void a(EntityPlayer entityplayer) { public void a(EntityPlayer entityplayer) {
- if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot - if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
+ if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) { //return; // Spigot // Paper + // Paper start - Send empty commands if tab completion is disabled
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(new RootCommandNode<>())); // Paper + if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) { //return; // Spigot
+ } // Paper + entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(new RootCommandNode<>()));
+ return;
+ }
+ // Paper end
// CraftBukkit start // CraftBukkit start
// Register Vanilla commands into builtRoot as before // Register Vanilla commands into builtRoot as before
// Paper start - Async command map building // Paper start - Async command map building