Allows greater control over Tab Command Complete.

You can now specify how many letters of the command must be typed before it will be tab completed this will help deter people from just spamming round all the commands to see if there is one incorrectly set up.
0 will tab complete all commands
-1 will disable tab complete

1 will mean you have to type the first letter
2 will mean you have to the second letter... etc...
This commit is contained in:
Ginger Geek 2014-04-02 18:00:58 +11:00 committed by md_5
parent 04d72bc702
commit fe031329f3
15 changed files with 75 additions and 64 deletions

View File

@ -1,4 +1,4 @@
From dc945bb032e60d81ba93c5bd07b473fd282ec312 Mon Sep 17 00:00:00 2001
From bac9d8f7fd5947eac549d30f8354f34e74919248 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 7 Jul 2013 09:32:53 +1000
Subject: [PATCH] Spigot Configuration
@ -95,7 +95,7 @@ index 9c81339..aa76abe 100644
int pollCount = 0;
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
new file mode 100644
index 0000000..3dfe4ed
index 0000000..fd5997d
--- /dev/null
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -0,0 +1,120 @@
@ -145,8 +145,8 @@ index 0000000..3dfe4ed
+
+ commands = new HashMap<String, Command>();
+
+ version = getInt( "config-version", 5 );
+ set( "config-version", 5 );
+ version = getInt( "config-version", 6 );
+ set( "config-version", 6 );
+ readConfig( SpigotConfig.class, null );
+ }
+

View File

@ -1,11 +1,11 @@
From 5661cb101470cba4d70bcb633b056c7ca6970c7a Mon Sep 17 00:00:00 2001
From aaff66ed71f21dd1228b50834d3a6d1daa3922dd 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 f04a35e..6e3b4e5 100644
index f04a35e..f06cac5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1578,6 +1578,13 @@ public final class CraftServer implements Server {
@ -13,7 +13,7 @@ index f04a35e..6e3b4e5 100644
public List<String> tabCompleteCommand(Player player, String message) {
+ // Spigot Start
+ if ( !org.spigotmc.SpigotConfig.tabComplete && !message.contains( " " ) )
+ if ( (org.spigotmc.SpigotConfig.tabComplete < 0 || message.length() <= org.spigotmc.SpigotConfig.tabComplete) && !message.contains( " " ) )
+ {
+ return ImmutableList.of();
+ }
@ -23,18 +23,29 @@ index f04a35e..6e3b4e5 100644
try {
completions = getCommandMap().tabComplete(player, message.substring(1));
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 4d15f8b..8764045 100644
index afd6b56..20634f1 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -136,4 +136,10 @@ public class SpigotConfig
@@ -136,4 +136,21 @@ public class SpigotConfig
{
logCommands = getBoolean( "commands.log", true );
}
+
+ public static boolean tabComplete;
+ public static int tabComplete;
+ private static void tabComplete()
+ {
+ tabComplete = getBoolean( "commands.tab-complete", true );
+ if ( version < 6 )
+ {
+ boolean oldValue = getBoolean( "commands.tab-complete", true );
+ if ( oldValue )
+ {
+ set( "commands.tab-complete", 0 );
+ } else
+ {
+ set( "commands.tab-complete", -1 );
+ }
+ }
+ tabComplete = getInt( "commands.tab-complete", 0 );
+ }
}
--

View File

@ -1,4 +1,4 @@
From 37e8f2b8631945d9d617a1c3e25f94a822428171 Mon Sep 17 00:00:00 2001
From af9035b6044147970e4b830a2205ae6301240374 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 21 Jun 2013 19:21:58 +1000
Subject: [PATCH] Configurable Messages
@ -45,7 +45,7 @@ index 1fb24f7..38c37c1 100644
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6e3b4e5..99294ad 100644
index f06cac5..76e43ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -701,11 +701,7 @@ public final class CraftServer implements Server {
@ -62,7 +62,7 @@ index 6e3b4e5..99294ad 100644
return false;
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 8764045..0ab2ec3 100644
index 20634f1..efcd193 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -12,6 +12,7 @@ import java.util.Map;
@ -73,9 +73,9 @@ index 8764045..0ab2ec3 100644
import org.bukkit.command.Command;
import org.bukkit.configuration.file.YamlConfiguration;
@@ -142,4 +143,28 @@ public class SpigotConfig
{
tabComplete = getBoolean( "commands.tab-complete", true );
@@ -153,4 +154,28 @@ public class SpigotConfig
}
tabComplete = getInt( "commands.tab-complete", 0 );
}
+
+ public static String whitelistMessage;

View File

@ -1,4 +1,4 @@
From 4930fa4aa556413371df3feef49b03b62bdd06dd Mon Sep 17 00:00:00 2001
From 3759de3b6c8e830718c6737382867c11305fd7b2 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
@ -141,10 +141,10 @@ index 0000000..2d330fc
+ }
+}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 0ab2ec3..2ea1be7 100644
index efcd193..2b499fe 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -167,4 +167,18 @@ public class SpigotConfig
@@ -178,4 +178,18 @@ public class SpigotConfig
outdatedClientMessage = transform( getString( "messages.outdated-client", outdatedClientMessage ) );
outdatedServerMessage = transform( getString( "messages.outdated-server", outdatedServerMessage ) );
}
@ -287,5 +287,5 @@ index 0000000..de08ad6
+ }
+}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From e22e6ecb8c26223ad7a763ddfe1c7f7882092397 Mon Sep 17 00:00:00 2001
From 30e848bc66d5249c518ef64af720b70ac09b15aa Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sun, 1 Dec 2013 18:18:41 +1100
Subject: [PATCH] BungeeCord Support
@ -115,10 +115,10 @@ index b96c27a..10a91fa 100644
{
return getHandle().collidesWithEntities;
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 2ea1be7..08bd5ba 100644
index 2b499fe..8bfffa5 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -181,4 +181,14 @@ public class SpigotConfig
@@ -192,4 +192,14 @@ public class SpigotConfig
commands.put( "restart", new RestartCommand( "restart" ) );
WatchdogThread.doStart( timeoutTime, restartOnCrash );
}

View File

@ -1,4 +1,4 @@
From 81ea1a22b818c51332cbef69e883aaecaf2d0af8 Mon Sep 17 00:00:00 2001
From b00d4f7e51de301740148b6ce62e2630aa5dae50 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Fri, 13 Dec 2013 11:58:58 +1100
Subject: [PATCH] Configurable Amount of Netty Threads
@ -37,10 +37,10 @@ index 2407ab2..41a690b 100644
public boolean aj() {
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 08bd5ba..cfddd28 100644
index 8bfffa5..b3278fd 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -191,4 +191,11 @@ public class SpigotConfig
@@ -202,4 +202,11 @@ public class SpigotConfig
}
bungee = getBoolean( "settings.bungeecord", false );
}
@ -53,5 +53,5 @@ index 08bd5ba..cfddd28 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From 460a53367fb82ef314f3bc229c914d2cb2b3e690 Mon Sep 17 00:00:00 2001
From c604226b758f3c8d75d3c63662015ba5dbd5b17f Mon Sep 17 00:00:00 2001
From: slide23 <me@slide.ws>
Date: Fri, 20 Dec 2013 20:15:33 -0600
Subject: [PATCH] Add Late Bind Option
@ -52,10 +52,10 @@ index 7946703..e91d53f 100644
h.info("Starting GS4 status listener");
this.j = new RemoteStatusListener(this);
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index cfddd28..69306cb 100644
index b3278fd..af73544 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -198,4 +198,9 @@ public class SpigotConfig
@@ -209,4 +209,9 @@ public class SpigotConfig
System.setProperty( "io.netty.eventLoopThreads", Integer.toString( count ) );
Bukkit.getLogger().log( Level.INFO, "Using {0} threads for Netty based IO", count );
}
@ -66,5 +66,5 @@ index cfddd28..69306cb 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From 921e759228e5730b577004542b8a08f23bd40976 Mon Sep 17 00:00:00 2001
From efb95588df7ce3c7de9c40105bdf4aa2d290ac7a Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Tue, 7 Jan 2014 15:56:26 +0000
Subject: [PATCH] Allow statistics to be disabled/forced
@ -40,7 +40,7 @@ index 0becb94..b868d08 100644
super.setStatistic(entityhuman, statistic, i);
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 69306cb..eaafc2d 100644
index af73544..54d9117 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -10,10 +10,13 @@ import java.util.HashMap;
@ -57,7 +57,7 @@ index 69306cb..eaafc2d 100644
import org.bukkit.configuration.file.YamlConfiguration;
public class SpigotConfig
@@ -203,4 +206,31 @@ public class SpigotConfig
@@ -214,4 +217,31 @@ public class SpigotConfig
private static void lateBind() {
lateBind = getBoolean( "settings.late-bind", false );
}
@ -90,5 +90,5 @@ index 69306cb..eaafc2d 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From 5463478685cd7c0ecc0a54304adfae6ac8c219d9 Mon Sep 17 00:00:00 2001
From 0e4528f834a8111276d33b09e27854def1214491 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sat, 25 Jan 2014 14:08:35 +1100
Subject: [PATCH] Highly Optimized Tick Loop
@ -96,10 +96,10 @@ index 1b7f65e..8ce9dd7 100644
this.a((CrashReport) null);
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index eaafc2d..713b351 100644
index 54d9117..2baed09 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -233,4 +233,9 @@ public class SpigotConfig
@@ -244,4 +244,9 @@ public class SpigotConfig
"screen." );
}
}
@ -161,5 +161,5 @@ index 0000000..2b8343d
+ }
+}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From a5ee9f8ccbb9361394accd391f1a0a420b41950f Mon Sep 17 00:00:00 2001
From 4f61b2f41522cb6201606476786d796fe8544741 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 26 Jan 2014 21:48:34 +1100
Subject: [PATCH] Configurable Ping Sample Size
@ -23,10 +23,10 @@ index 7903c43..f9da452 100644
ServerPing ping = new ServerPing();
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 713b351..ba28878 100644
index 2baed09..8eac742 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -238,4 +238,11 @@ public class SpigotConfig
@@ -249,4 +249,11 @@ public class SpigotConfig
{
commands.put( "tps", new TicksPerSecondCommand( "tps" ) );
}
@ -39,5 +39,5 @@ index 713b351..ba28878 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From 3ed47f2e9a03b284f414f00fe7d830c086d2f0f3 Mon Sep 17 00:00:00 2001
From faafbd328712156c796413a02011413b74735cb4 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Mon, 27 Jan 2014 08:39:26 +1100
Subject: [PATCH] Add Optional Tick Shuffling
@ -24,10 +24,10 @@ index c2194af..1d7b814 100644
while (iterator.hasNext()) {
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index ba28878..61fb942 100644
index 8eac742..e26b964 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -245,4 +245,10 @@ public class SpigotConfig
@@ -256,4 +256,10 @@ public class SpigotConfig
playerSample = getInt( "settings.sample-count", 12 );
System.out.println( "Server Ping Player Sample Count: " + playerSample );
}
@ -39,5 +39,5 @@ index ba28878..61fb942 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From 8178e7df810e05d3fc3e92ae22420f689d31dd59 Mon Sep 17 00:00:00 2001
From de99e5f686fd953184ff846ffcbf7034c8665245 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 8 Feb 2014 08:13:40 +0000
Subject: [PATCH] Spam Filter Exclusions
@ -30,7 +30,7 @@ index 28bf9d4..92f95d7 100644
Waitable waitable = new Waitable() {
@Override
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 61fb942..8da3cc9 100644
index e26b964..5d65983 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -6,6 +6,7 @@ import java.io.IOException;
@ -41,7 +41,7 @@ index 61fb942..8da3cc9 100644
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -251,4 +252,13 @@ public class SpigotConfig
@@ -262,4 +263,13 @@ public class SpigotConfig
{
playerShuffle = getInt( "settings.player-shuffle", 0 );
}
@ -56,5 +56,5 @@ index 61fb942..8da3cc9 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From a7b42fb91500ce69102e9fa2007fe059f1420eb3 Mon Sep 17 00:00:00 2001
From c4865a8d3af6d5e5a9704f7dfa4cba7811c54d43 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Sun, 9 Feb 2014 14:39:01 +1100
Subject: [PATCH] Add Option to Silence CommandBlock Console
@ -18,10 +18,10 @@ index 4c21643..4e4f001 100644
}
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 8da3cc9..7cba69f 100644
index 5d65983..d749f16 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -261,4 +261,10 @@ public class SpigotConfig
@@ -272,4 +272,10 @@ public class SpigotConfig
"/skill"
} ) );
}
@ -33,5 +33,5 @@ index 8da3cc9..7cba69f 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,4 +1,4 @@
From 31f63511094b848c05597c101ca419edfaf88c88 Mon Sep 17 00:00:00 2001
From 6cac3a83109bb7903794a9772254b5968a5a2d9e Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Wed, 12 Feb 2014 18:18:01 +1100
Subject: [PATCH] Allow Disabling Creative Item Filter
@ -18,10 +18,10 @@ index 92f95d7..eb5b84e 100644
// CraftBukkit start - Call click event
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 7cba69f..7589246 100644
index d749f16..0d0c7b0 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -267,4 +267,10 @@ public class SpigotConfig
@@ -278,4 +278,10 @@ public class SpigotConfig
{
silentCommandBlocks = getBoolean( "commands.silent-commandblock-console", false );
}
@ -33,5 +33,5 @@ index 7cba69f..7589246 100644
+ }
}
--
1.8.5.2.msysgit.0
1.8.3.2

View File

@ -1,11 +1,11 @@
From 40263add90c8f2ebecd54ca10185456268a702ed Mon Sep 17 00:00:00 2001
From 92df26321a72fc86c2202de5c1e2a8c252593a9b Mon Sep 17 00:00:00 2001
From: Thinkofdeath <thethinkofdeath@gmail.com>
Date: Wed, 12 Feb 2014 20:44:14 +0000
Subject: [PATCH] Allow vanilla commands to be the main version of a command
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 99294ad..6912fab 100644
index 76e43ba..5d8c557 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -116,6 +116,7 @@ import org.bukkit.command.CommandSender;
@ -138,7 +138,7 @@ index 99294ad..6912fab 100644
private void loadPlugin(Plugin plugin) {
try {
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 7589246..df70756 100644
index 0d0c7b0..4703768 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -8,8 +8,10 @@ import java.lang.reflect.Method;
@ -152,7 +152,7 @@ index 7589246..df70756 100644
import java.util.logging.Level;
import gnu.trove.map.hash.TObjectIntHashMap;
@@ -273,4 +275,16 @@ public class SpigotConfig
@@ -284,4 +286,16 @@ public class SpigotConfig
{
filterCreativeItems = getBoolean( "settings.filter-creative-items", true );
}