From 32a913a2223ddc37fc35c96e62247683901c640f Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Sat, 10 Dec 2011 12:20:24 -0500 Subject: [PATCH] Linked thundering and storming. --- src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 553bb1bd5c..45035b0e23 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -590,10 +590,11 @@ public class CraftWorld implements World { } public boolean isThundering() { - return world.worldData.isThundering(); + return hasStorm() && world.worldData.isThundering(); } public void setThundering(boolean thundering) { + if (thundering && !hasStorm()) setStorm(true); CraftServer server = world.getServer(); ThunderChangeEvent thunder = new ThunderChangeEvent((org.bukkit.World) this, thundering); @@ -886,9 +887,9 @@ public class CraftWorld implements World { if (getClass() != obj.getClass()) { return false; } - + final CraftWorld other = (CraftWorld) obj; - + return this.getUID() == other.getUID(); }