mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-20 14:08:57 +01:00
Linked thundering and storming.
This commit is contained in:
parent
f7649724fe
commit
32a913a222
1 changed files with 4 additions and 3 deletions
|
@ -590,10 +590,11 @@ public class CraftWorld implements World {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isThundering() {
|
public boolean isThundering() {
|
||||||
return world.worldData.isThundering();
|
return hasStorm() && world.worldData.isThundering();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setThundering(boolean thundering) {
|
public void setThundering(boolean thundering) {
|
||||||
|
if (thundering && !hasStorm()) setStorm(true);
|
||||||
CraftServer server = world.getServer();
|
CraftServer server = world.getServer();
|
||||||
|
|
||||||
ThunderChangeEvent thunder = new ThunderChangeEvent((org.bukkit.World) this, thundering);
|
ThunderChangeEvent thunder = new ThunderChangeEvent((org.bukkit.World) this, thundering);
|
||||||
|
@ -886,9 +887,9 @@ public class CraftWorld implements World {
|
||||||
if (getClass() != obj.getClass()) {
|
if (getClass() != obj.getClass()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final CraftWorld other = (CraftWorld) obj;
|
final CraftWorld other = (CraftWorld) obj;
|
||||||
|
|
||||||
return this.getUID() == other.getUID();
|
return this.getUID() == other.getUID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue