diff --git a/src/main/java/com/legacyminecraft/poseidon/PoseidonConfig.java b/src/main/java/com/legacyminecraft/poseidon/PoseidonConfig.java index 0e810182..23720040 100644 --- a/src/main/java/com/legacyminecraft/poseidon/PoseidonConfig.java +++ b/src/main/java/com/legacyminecraft/poseidon/PoseidonConfig.java @@ -180,6 +180,9 @@ private void write() { "This setting controls the maximum number of entities of a mob spawner type that can exist within the defined chunk radius around a mob spawner. If the number of entities exceeds this limit, the spawner will stop spawning additional entities of that type. This is useful to stop the extreme lag that can be caused by mob spawners."); + generateConfigOption("world.settings.disable-natural-weather-change.enabled", false); + generateConfigOption("world.settings.disable-natural-weather-change.info", "When enabled, weather will no longer change naturally over time. Weather can still be changed by plugins and commands."); + //generateConfigOption("world-settings.eject-from-vehicle-on-teleport.enabled", true); //generateConfigOption("world-settings.eject-from-vehicle-on-teleport.info", "Eject the player from a boat or minecart before teleporting them preventing cross world coordinate exploits."); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 97284b60..35a06972 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,6 @@ package net.minecraft.server; +import com.legacyminecraft.poseidon.PoseidonConfig; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.block.BlockState; @@ -1772,6 +1773,7 @@ protected void i() { --this.m; } + if (!PoseidonConfig.getInstance().getConfigBoolean("world.settings.disable-natural-weather-change.enabled", false)) { int i = this.worldData.getThunderDuration(); if (i <= 0) { @@ -1816,6 +1818,7 @@ protected void i() { // CraftBukkit end } } + } this.i = this.j; if (this.worldData.hasStorm()) {