Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-21 14:00:11 +01:00
SPIGOT-4765: WeatherChangeEvent occurs every tick
Dieser Commit ist enthalten in:
Ursprung
8f2a45bf35
Commit
abab38526a
@ -28,11 +28,15 @@
|
||||
}
|
||||
|
||||
public long getSeed() {
|
||||
@@ -508,6 +515,16 @@
|
||||
@@ -508,6 +515,20 @@
|
||||
}
|
||||
|
||||
public void setThundering(boolean flag) {
|
||||
+ // CraftBukkit start
|
||||
+ if (this.z == flag) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ org.bukkit.World world = Bukkit.getWorld(getName());
|
||||
+ if (world != null) {
|
||||
+ ThunderChangeEvent thunder = new ThunderChangeEvent(world, flag);
|
||||
@ -45,11 +49,15 @@
|
||||
this.z = flag;
|
||||
}
|
||||
|
||||
@@ -524,6 +541,16 @@
|
||||
@@ -524,6 +545,20 @@
|
||||
}
|
||||
|
||||
public void setStorm(boolean flag) {
|
||||
+ // CraftBukkit start
|
||||
+ if (this.x == flag) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ org.bukkit.World world = Bukkit.getWorld(getName());
|
||||
+ if (world != null) {
|
||||
+ WeatherChangeEvent weather = new WeatherChangeEvent(world, flag);
|
||||
@ -62,7 +70,7 @@
|
||||
this.x = flag;
|
||||
}
|
||||
|
||||
@@ -673,6 +700,12 @@
|
||||
@@ -673,6 +708,12 @@
|
||||
|
||||
public void setDifficulty(EnumDifficulty enumdifficulty) {
|
||||
this.G = enumdifficulty;
|
||||
@ -75,7 +83,7 @@
|
||||
}
|
||||
|
||||
public boolean isDifficultyLocked() {
|
||||
@@ -777,4 +810,12 @@
|
||||
@@ -777,4 +818,12 @@
|
||||
public void a(UUID uuid) {
|
||||
this.X = uuid;
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren