mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 17:52:02 -07:00
Server Commands and Remote Commands are now Cancellable.
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