Ignore cancelled events for OP command disabling (#2527)

This commit is contained in:
Luck 2020-08-13 11:03:24 +01:00
parent 6f90e545fc
commit 7fae141e33
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
2 changed files with 6 additions and 6 deletions

View File

@ -49,17 +49,17 @@ public class BukkitPlatformListener implements Listener {
this.plugin = plugin;
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onPlayerCommand(PlayerCommandPreprocessEvent e) {
handleCommand(e.getPlayer(), e.getMessage().toLowerCase(), e);
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onServerCommand(ServerCommandEvent e) {
handleCommand(e.getSender(), e.getCommand().toLowerCase(), e);
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onRemoteServerCommand(RemoteServerCommandEvent e) {
handleCommand(e.getSender(), e.getCommand().toLowerCase(), e);
}

View File

@ -48,17 +48,17 @@ public class NukkitPlatformListener implements Listener {
this.plugin = plugin;
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onPlayerCommand(PlayerCommandPreprocessEvent e) {
handleCommand(e.getPlayer(), e.getMessage().toLowerCase(), e);
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onServerCommand(ServerCommandEvent e) {
handleCommand(e.getSender(), e.getCommand().toLowerCase(), e);
}
@EventHandler
@EventHandler(ignoreCancelled = true)
public void onRemoteServerCommand(RemoteServerCommandEvent e) {
handleCommand(e.getSender(), e.getCommand().toLowerCase(), e);
}