amoung us

This commit is contained in:
Minecon724 2022-04-23 18:35:14 +00:00
parent 7b5c8b3044
commit 5639e89810

View file

@ -7,6 +7,7 @@ import org.bukkit.Bukkit;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import pl.minecon724.realweather.WeatherState.ConditionSimple;
import pl.minecon724.realweather.WeatherState.State; import pl.minecon724.realweather.WeatherState.State;
public class GetStateTask extends BukkitRunnable { public class GetStateTask extends BukkitRunnable {
@ -40,17 +41,8 @@ public class GetStateTask extends BukkitRunnable {
for (String w : worlds) { for (String w : worlds) {
World world = Bukkit.getWorld(w); World world = Bukkit.getWorld(w);
if (world == null) continue; if (world == null) continue;
switch (state.simple) { world.setThundering(state.simple == ConditionSimple.THUNDER ? true : false);
case CLEAR: world.setStorm(state.simple == ConditionSimple.CLEAR ? false : true);
world.setThundering(false);
world.setStorm(false);
case RAIN:
world.setThundering(false);
world.setStorm(true);
case THUNDER:
world.setThundering(false);
world.setStorm(true);
}
} }
} }
} }