change message when commands are cancelled

This commit is contained in:
Jack
2024-06-23 17:21:02 -04:00
parent b751b4ad3e
commit 79d1fc7b88

View File

@@ -17,7 +17,7 @@ public class EventHandler implements Listener {
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);
event.getPlayer().sendMessage("Command cancelled (RealTimeWeather is controlling this)"); event.getPlayer().sendMessage("Command disabled by RealTimeWeather");
} }
} }
@@ -26,7 +26,7 @@ public class EventHandler implements Listener {
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);
event.getSender().sendMessage("Command cancelled (RealTimeWeather is controlling this)"); event.getSender().sendMessage("Command disabled by RealTimeWeather");
} }
} }
} }