Server Commands and Remote Commands are now Cancellable.
By: Matt <mattbdev@outlook.com>
This commit is contained in:
@@ -178,7 +178,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -491,13 +564,57 @@
|
||||
@@ -491,13 +564,60 @@
|
||||
}
|
||||
|
||||
public String getPlugins() {
|
||||
@@ -223,6 +223,9 @@
|
||||
+ // Event changes start
|
||||
+ RemoteServerCommandEvent event = new RemoteServerCommandEvent(remoteConsole, s);
|
||||
+ server.getPluginManager().callEvent(event);
|
||||
+ if (event.isCancelled()) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ // Event change end
|
||||
+ ServerCommand serverCommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.getInstance());
|
||||
+ server.dispatchServerCommand(remoteConsole, serverCommand);
|
||||
|
||||
Reference in New Issue
Block a user