From cea3366164dcd83fd1e686c896d2be56e0ae926f Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 7 May 2020 16:43:20 +0200 Subject: [PATCH] fix: apply gamerules in every world --- varo/src/main/java/de/cliffbreak/varo/Varo.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/Varo.java b/varo/src/main/java/de/cliffbreak/varo/Varo.java index 8f0d670..58bd0d6 100644 --- a/varo/src/main/java/de/cliffbreak/varo/Varo.java +++ b/varo/src/main/java/de/cliffbreak/varo/Varo.java @@ -8,7 +8,6 @@ import org.bukkit.Difficulty; import org.bukkit.GameRule; import org.bukkit.NamespacedKey; import org.bukkit.World; -import org.bukkit.World.Environment; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.configuration.file.YamlConfiguration; @@ -67,12 +66,10 @@ public class Varo extends JavaPlugin { getCommand("varo").setExecutor(new VaroCommand(this)); for (World world : getServer().getWorlds()) { - if (world.getEnvironment() == Environment.NORMAL) { - // world.setDifficulty(Difficulty.HARD); - world.setDifficulty(Difficulty.PEACEFUL); // TODO: REMOVE AFTER DEBUG!! - world.setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false); - world.setGameRule(GameRule.REDUCED_DEBUG_INFO, true); - } + // world.setDifficulty(Difficulty.HARD); + world.setDifficulty(Difficulty.PEACEFUL); // TODO: REMOVE AFTER DEBUG!! + world.setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false); + world.setGameRule(GameRule.REDUCED_DEBUG_INFO, true); } getServer().removeRecipe(NamespacedKey.minecraft("fishing_rod")); }