Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-1634: Fix cancelling ServerCommandEvent
Dieser Commit ist enthalten in:
Ursprung
78578ca517
Commit
f5f09ffcbf
@ -161,7 +161,7 @@
|
|||||||
super.D();
|
super.D();
|
||||||
this.aL();
|
this.aL();
|
||||||
}
|
}
|
||||||
@@ -329,7 +388,14 @@
|
@@ -329,7 +388,15 @@
|
||||||
while (!this.serverCommandQueue.isEmpty()) {
|
while (!this.serverCommandQueue.isEmpty()) {
|
||||||
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
|
ServerCommand servercommand = (ServerCommand) this.serverCommandQueue.remove(0);
|
||||||
|
|
||||||
@ -169,6 +169,7 @@
|
|||||||
+ // CraftBukkit start - ServerCommand for preprocessing
|
+ // CraftBukkit start - ServerCommand for preprocessing
|
||||||
+ ServerCommandEvent event = new ServerCommandEvent(console, servercommand.command);
|
+ ServerCommandEvent event = new ServerCommandEvent(console, servercommand.command);
|
||||||
+ server.getPluginManager().callEvent(event);
|
+ server.getPluginManager().callEvent(event);
|
||||||
|
+ if (event.isCancelled()) continue;
|
||||||
+ servercommand = new ServerCommand(event.getCommand(), servercommand.source);
|
+ servercommand = new ServerCommand(event.getCommand(), servercommand.source);
|
||||||
+
|
+
|
||||||
+ // this.getCommandHandler().a(servercommand.source, servercommand.command); // Called in dispatchServerCommand
|
+ // this.getCommandHandler().a(servercommand.source, servercommand.command); // Called in dispatchServerCommand
|
||||||
@ -177,7 +178,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -536,16 +602,70 @@
|
@@ -536,16 +603,70 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPlugins() {
|
public String getPlugins() {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren