diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 066c681c..e7d0588b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -751,20 +751,7 @@ public class CraftWorld implements World { } public void setStorm(boolean hasStorm) { - CraftServer server = world.getServer(); - - WeatherChangeEvent weather = new WeatherChangeEvent(this, hasStorm); - server.getPluginManager().callEvent(weather); - if (!weather.isCancelled()) { - world.worldData.setStorm(hasStorm); - - // These numbers are from Minecraft - if (hasStorm) { - setWeatherDuration(rand.nextInt(12000) + 12000); - } else { - setWeatherDuration(rand.nextInt(168000) + 12000); - } - } + world.worldData.setStorm(hasStorm); } public int getWeatherDuration() { @@ -780,21 +767,7 @@ public class CraftWorld implements World { } public void setThundering(boolean thundering) { - if (thundering && !hasStorm()) setStorm(true); - CraftServer server = world.getServer(); - - ThunderChangeEvent thunder = new ThunderChangeEvent(this, thundering); - server.getPluginManager().callEvent(thunder); - if (!thunder.isCancelled()) { - world.worldData.setThundering(thundering); - - // These numbers are from Minecraft - if (thundering) { - setThunderDuration(rand.nextInt(12000) + 3600); - } else { - setThunderDuration(rand.nextInt(168000) + 12000); - } - } + world.worldData.setThundering(thundering); } public int getThunderDuration() { |