Add initial cloud commands + refactors to common
This commit is contained in:
parent
f21306021d
commit
6545d7ffac
89 changed files with 1959 additions and 1893 deletions
|
|
@ -39,7 +39,7 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
|||
import org.bukkit.plugin.PluginLoader;
|
||||
import org.bukkit.plugin.UnknownDependencyException;
|
||||
|
||||
public class BukkitPluginManager extends AbstractPluginManager<Plugin> {
|
||||
public class BukkitPluginManager implements AbstractPluginManager<Plugin> {
|
||||
|
||||
private static BukkitPluginManager instance;
|
||||
|
||||
|
|
@ -306,6 +306,25 @@ public class BukkitPluginManager extends AbstractPluginManager<Plugin> {
|
|||
RCraftServer.syncCommands();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters all the specified commands.
|
||||
*/
|
||||
public static void unregisterCommands(String... commands) {
|
||||
Map<String, Command> map;
|
||||
try {
|
||||
map = RCommandMap.getKnownCommands(RCraftServer.getCommandMap());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
return;
|
||||
}
|
||||
|
||||
for (String command : commands) {
|
||||
map.remove(command);
|
||||
}
|
||||
|
||||
RCraftServer.syncCommands();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters all specified commands exactly.
|
||||
* @param commands The commands to unregister.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue