@@ -2182,6 +2182,13 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public List<String> tabCompleteCommand(Player player, String message, ServerLevel world, Vec3 pos) {
|
||||
// Spigot Start
|
||||
if ( (org.spigotmc.SpigotConfig.tabComplete < 0 || message.length() <= org.spigotmc.SpigotConfig.tabComplete) && !message.contains( " " ) )
|
||||
{
|
||||
return ImmutableList.of();
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
List<String> completions = null;
|
||||
try {
|
||||
if (message.startsWith("/")) {
|
||||
|
||||
@@ -156,4 +156,23 @@ public class SpigotConfig
|
||||
{
|
||||
SpigotConfig.logCommands = SpigotConfig.getBoolean( "commands.log", true );
|
||||
}
|
||||
|
||||
public static int tabComplete;
|
||||
public static boolean sendNamespaced;
|
||||
private static void tabComplete()
|
||||
{
|
||||
if ( SpigotConfig.version < 6 )
|
||||
{
|
||||
boolean oldValue = SpigotConfig.getBoolean( "commands.tab-complete", true );
|
||||
if ( oldValue )
|
||||
{
|
||||
SpigotConfig.set( "commands.tab-complete", 0 );
|
||||
} else
|
||||
{
|
||||
SpigotConfig.set( "commands.tab-complete", -1 );
|
||||
}
|
||||
}
|
||||
SpigotConfig.tabComplete = SpigotConfig.getInt( "commands.tab-complete", 0 );
|
||||
SpigotConfig.sendNamespaced = SpigotConfig.getBoolean( "commands.send-namespaced", true );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user