renamed EventHandler command methods

This commit is contained in:
Jack
2024-06-26 22:36:56 -04:00
parent 4543087258
commit c605b60903

View File

@@ -16,7 +16,7 @@ public class EventHandler implements Listener {
} }
@org.bukkit.event.EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) @org.bukkit.event.EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onOperatorSet(PlayerCommandPreprocessEvent event) { public void onCommandPreprocess(PlayerCommandPreprocessEvent event) {
if ((config.getBlockTimeSetCommand() && config.isTimeEnabled() && event.getMessage().contains("time set")) if ((config.getBlockTimeSetCommand() && config.isTimeEnabled() && event.getMessage().contains("time set"))
|| (config.getBlockWeatherCommand() && config.isWeatherEnabled() && event.getMessage().contains("weather"))) { || (config.getBlockWeatherCommand() && config.isWeatherEnabled() && event.getMessage().contains("weather"))) {
event.setCancelled(true); event.setCancelled(true);
@@ -25,7 +25,7 @@ public class EventHandler implements Listener {
} }
@org.bukkit.event.EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true) @org.bukkit.event.EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = true)
public void onOperatorSetConsole(ServerCommandEvent event) { public void onConsoleCommand(ServerCommandEvent event) {
if ((config.getBlockTimeSetCommand() && config.isTimeEnabled() && event.getCommand().contains("time set")) if ((config.getBlockTimeSetCommand() && config.isTimeEnabled() && event.getCommand().contains("time set"))
|| (config.getBlockWeatherCommand() && config.isWeatherEnabled() && event.getCommand().contains("weather"))) { || (config.getBlockWeatherCommand() && config.isWeatherEnabled() && event.getCommand().contains("weather"))) {
event.setCancelled(true); event.setCancelled(true);