Add VanillaCommandWrapper which allows use of vanilla commands instead of Bukkit's versions
By: Thinkofdeath <thethinkofdeath@gmail.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 47c6643184e01fc22dc9eecbca2aec48e2900616 Mon Sep 17 00:00:00 2001
|
||||
From: Thinkofdeath <thethinkofdeath@gmail.com>
|
||||
Date: Wed, 18 Dec 2013 10:19:50 +1100
|
||||
Subject: [PATCH] Allow for fallback commands to be removed.
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index f716782..cb0707f 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -326,4 +326,18 @@ public class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // Spigot Start
|
||||
+ public static void removeFallback(String name)
|
||||
+ {
|
||||
+ Iterator<VanillaCommand> it = fallbackCommands.iterator();
|
||||
+ while ( it.hasNext() )
|
||||
+ {
|
||||
+ if ( it.next().getName().equals( name ) )
|
||||
+ {
|
||||
+ it.remove();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Spigot End
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
|
||||
Reference in New Issue
Block a user