3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-17 12:00:07 +01:00
Paper/Bukkit-Patches/0020-Allow-for-fallback-commands-to-be-removed.patch

33 Zeilen
964 B
Diff

From 7a4e9a52584e1a01c04a7c8cd0d17743f6fd6414 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 9ae0bce..53c9207 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -333,4 +333,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