From 57b254d94f3933afd70d0a7858727b3cd1f575ff Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Thu, 6 May 2021 16:25:29 -0700
Subject: [PATCH] Return after sending empty commands (#5586)

---
 ...nd-empty-commands-if-tab-completion-is-disabled.patch | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Spigot-Server-Patches/Send-empty-commands-if-tab-completion-is-disabled.patch b/Spigot-Server-Patches/Send-empty-commands-if-tab-completion-is-disabled.patch
index 9d8cdf8255..8360f60660 100644
--- a/Spigot-Server-Patches/Send-empty-commands-if-tab-completion-is-disabled.patch
+++ b/Spigot-Server-Patches/Send-empty-commands-if-tab-completion-is-disabled.patch
@@ -13,9 +13,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      public void a(EntityPlayer entityplayer) {
 -        if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
-+        if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) { //return; // Spigot // Paper
-+            entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(new RootCommandNode<>())); // Paper
-+        } // Paper
++        // Paper start - Send empty commands if tab completion is disabled
++        if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) { //return; // Spigot
++            entityplayer.playerConnection.sendPacket(new PacketPlayOutCommands(new RootCommandNode<>()));
++            return;
++        }
++        // Paper end
          // CraftBukkit start
          // Register Vanilla commands into builtRoot as before
          // Paper start - Async command map building