mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 05:03:55 -07:00
clearPlugins() and clearCommands() for PluginManager and CommandMap respectively
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -26,4 +26,8 @@ public interface CommandMap {
|
||||
*/
|
||||
public boolean dispatch(Player sender, String cmdLine);
|
||||
|
||||
/**
|
||||
* Clears all registered commands.
|
||||
*/
|
||||
public void clearCommands();
|
||||
}
|
||||
|
@@ -86,6 +86,12 @@ public final class SimpleCommandMap implements CommandMap {
|
||||
return isRegisteredCommand;
|
||||
}
|
||||
|
||||
public void clearCommands() {
|
||||
synchronized (this) {
|
||||
knownCommands.clear();
|
||||
}
|
||||
}
|
||||
|
||||
private static class VersionCommand extends Command {
|
||||
private final Server server;
|
||||
|
||||
|
Reference in New Issue
Block a user