2013-12-18 07:48:18 +01:00
|
|
|
From b3235471bc185d87ea76910a169501977ec9c578 Mon Sep 17 00:00:00 2001
|
2013-12-17 14:56:38 +01:00
|
|
|
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
|
2013-12-18 07:48:18 +01:00
|
|
|
index c2f488a..9283b23 100644
|
2013-12-17 14:56:38 +01:00
|
|
|
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
|
|
|
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
2013-12-18 07:48:18 +01:00
|
|
|
@@ -330,4 +330,18 @@ public class SimpleCommandMap implements CommandMap {
|
2013-12-17 14:56:38 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // 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
|
|
|
|
|