feat: dont announce advancements

This commit is contained in:
Simon Giesel 2020-05-06 10:47:53 +02:00
parent b97d83333b
commit d4c6af4633

View file

@ -5,6 +5,7 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import org.bukkit.Difficulty; import org.bukkit.Difficulty;
import org.bukkit.GameRule;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.World.Environment; import org.bukkit.World.Environment;
@ -16,6 +17,7 @@ import de.cliffbreak.varo.commands.VaroCommand;
import de.cliffbreak.varo.listeners.BannedItemListener; import de.cliffbreak.varo.listeners.BannedItemListener;
import de.cliffbreak.varo.listeners.ChatListener; import de.cliffbreak.varo.listeners.ChatListener;
import de.cliffbreak.varo.listeners.CreatureSpawnListener; import de.cliffbreak.varo.listeners.CreatureSpawnListener;
import de.cliffbreak.varo.listeners.EntityDamageByEntityListener;
import de.cliffbreak.varo.listeners.EntityRegainHealthListener; import de.cliffbreak.varo.listeners.EntityRegainHealthListener;
import de.cliffbreak.varo.listeners.PlayerClientOptionsChangeListener; import de.cliffbreak.varo.listeners.PlayerClientOptionsChangeListener;
import de.cliffbreak.varo.listeners.PlayerDeathListener; import de.cliffbreak.varo.listeners.PlayerDeathListener;
@ -57,6 +59,7 @@ public class Varo extends JavaPlugin {
for (World world : getServer().getWorlds()) { for (World world : getServer().getWorlds()) {
if (world.getEnvironment() == Environment.NORMAL) { if (world.getEnvironment() == Environment.NORMAL) {
world.setDifficulty(Difficulty.HARD); world.setDifficulty(Difficulty.HARD);
world.setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false);
} }
} }
getServer().removeRecipe(NamespacedKey.minecraft("fishing_rod")); getServer().removeRecipe(NamespacedKey.minecraft("fishing_rod"));