From 5639e89810573444ee3cc48063cdd1192bea75c0 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 23 Apr 2022 18:35:14 +0000 Subject: [PATCH] amoung us --- .../pl/minecon724/realweather/GetStateTask.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/pl/minecon724/realweather/GetStateTask.java b/src/main/java/pl/minecon724/realweather/GetStateTask.java index 049b3cf..20c7dbd 100644 --- a/src/main/java/pl/minecon724/realweather/GetStateTask.java +++ b/src/main/java/pl/minecon724/realweather/GetStateTask.java @@ -7,6 +7,7 @@ import org.bukkit.Bukkit; import org.bukkit.World; import org.bukkit.scheduler.BukkitRunnable; +import pl.minecon724.realweather.WeatherState.ConditionSimple; import pl.minecon724.realweather.WeatherState.State; public class GetStateTask extends BukkitRunnable { @@ -40,17 +41,8 @@ public class GetStateTask extends BukkitRunnable { for (String w : worlds) { World world = Bukkit.getWorld(w); if (world == null) continue; - switch (state.simple) { - case CLEAR: - world.setThundering(false); - world.setStorm(false); - case RAIN: - world.setThundering(false); - world.setStorm(true); - case THUNDER: - world.setThundering(false); - world.setStorm(true); - } + world.setThundering(state.simple == ConditionSimple.THUNDER ? true : false); + world.setStorm(state.simple == ConditionSimple.CLEAR ? false : true); } } }