Allow non-PluginCommand's to be unloaded
This commit is contained in:
parent
b51ff445dd
commit
b83da96cac
2 changed files with 32 additions and 8 deletions
|
|
@ -306,6 +306,16 @@ public class BukkitPluginManager extends AbstractPluginManager<Plugin> {
|
|||
RCraftServer.syncCommands();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters all specified commands exactly.
|
||||
* @param commands The commands to unregister.
|
||||
*/
|
||||
public static void unregisterExactCommands(Collection<? extends Command> commands) {
|
||||
Map<String, Command> knownCommands = getKnownCommands();
|
||||
if (knownCommands == null) return;
|
||||
knownCommands.values().removeAll(commands);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a command from the command map.
|
||||
* @param command The command string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue