Linked thundering and storming.

By: EvilSeph <evilseph@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-12-10 12:20:24 -05:00
parent 67af7c0ed5
commit a163a97e1c

View file

@ -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();
}