Tweak tab complete disabled to only disable completion of the /command section, and not any subsequent arguments to the command, such as player names or plugin provided completions.

This commit is contained in:
md_5 2014-01-13 08:57:22 +11:00
parent 83c105ef02
commit 0add6ac4af

View file

@ -1,11 +1,11 @@
From 6aa34bd1ad851735520b469695f03a1994a7c2be Mon Sep 17 00:00:00 2001
From 70929539b9364e87555da91424d189d0e70949d2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 18:05:54 +1000
Subject: [PATCH] Allow Disabling of Command TabComplete
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6a38465..4d77259 100644
index 6a38465..0633516 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1398,6 +1398,13 @@ public final class CraftServer implements Server {
@ -13,7 +13,7 @@ index 6a38465..4d77259 100644
public List<String> tabCompleteCommand(Player player, String message) {
+ // Spigot Start
+ if ( !org.spigotmc.SpigotConfig.tabComplete )
+ if ( !org.spigotmc.SpigotConfig.tabComplete && !message.contains( " " ) )
+ {
+ return ImmutableList.of();
+ }