Move replace-commands to commands.replace-commands
By: Thinkofdeath <thethinkofdeath@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From b38f4afbdf46e734be406a03249a7388b223bae7 Mon Sep 17 00:00:00 2001
|
||||
From fc1e8ad76e7fbded89c1277ef6d5a3c21a4583e7 Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||
Date: Wed, 18 Dec 2013 10:32:15 +1100
|
||||
Subject: [PATCH] Add VanillaCommand Wrapper to Support New Commands
|
||||
@@ -32,7 +32,7 @@ index e63f17c..e58be15 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5cd6f7d..232a604 100644
|
||||
index 716cb15..07fcf38 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -546,6 +546,12 @@ public final class CraftServer implements Server {
|
||||
@@ -76,7 +76,7 @@ index 5cd6f7d..232a604 100644
|
||||
|
||||
public List<String> tabCompleteChat(Player player, String message) {
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
|
||||
index c4a5488..628533e 100644
|
||||
index c4a5488..1befcb9 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;
|
||||
@@ -95,14 +95,18 @@ index c4a5488..628533e 100644
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.craftbukkit.command.TicksPerSecondCommand;
|
||||
|
||||
@@ -204,4 +206,13 @@ public class SpigotConfig
|
||||
@@ -204,4 +206,17 @@ public class SpigotConfig
|
||||
System.setProperty( "io.netty.eventLoopThreads", Integer.toString( count ) );
|
||||
Bukkit.getLogger().log( Level.INFO, "Using {0} threads for Netty based IO", count );
|
||||
}
|
||||
+
|
||||
+ private static void replaceCommands()
|
||||
+ {
|
||||
+ for ( String command : (List<String>) getList( "replace-commands", Arrays.asList( "setblock", "summon", "testforblock" ) ) )
|
||||
+ if ( config.contains( "replace-commands" ) ) {
|
||||
+ set( "commands.replace-commands", config.getStringList( "replace-commands" ) );
|
||||
+ config.set( "replace-commands", null );
|
||||
+ }
|
||||
+ for ( String command : (List<String>) getList( "commands.replace-commands", Arrays.asList( "setblock", "summon", "testforblock" ) ) )
|
||||
+ {
|
||||
+ SimpleCommandMap.removeFallback( command );
|
||||
+ VanillaCommandWrapper.allowedCommands.add( command );
|
||||
@@ -310,5 +314,5 @@ index 0000000..a6c76cc
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.8.3.2
|
||||
1.8.4.msysgit.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user