feat: add all gamerules
This commit is contained in:
parent
ef953d8c8f
commit
5ab70b7cb9
3 changed files with 71 additions and 36 deletions
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
|
@ -4,6 +4,7 @@
|
|||
"java.jdt.ls.vmargs": "-Dfile.encoding=UTF-8",
|
||||
"java.configuration.updateBuildConfiguration": "automatic",
|
||||
"cSpell.words": [
|
||||
"Aragur",
|
||||
"Gamemode",
|
||||
"Gamerules",
|
||||
"Minecraft",
|
||||
|
|
|
@ -66,10 +66,41 @@ public class Varo extends JavaPlugin {
|
|||
getCommand("varo").setExecutor(new VaroCommand(this));
|
||||
|
||||
for (World world : getServer().getWorlds()) {
|
||||
// world.setDifficulty(Difficulty.HARD);
|
||||
world.setDifficulty(Difficulty.PEACEFUL); // TODO: REMOVE AFTER DEBUG!!
|
||||
world.setDifficulty(Difficulty.HARD);
|
||||
world.setGameRule(GameRule.ANNOUNCE_ADVANCEMENTS, false);
|
||||
world.setGameRule(GameRule.COMMAND_BLOCK_OUTPUT, true);
|
||||
world.setGameRule(GameRule.DISABLE_ELYTRA_MOVEMENT_CHECK, false);
|
||||
world.setGameRule(GameRule.DISABLE_RAIDS, false);
|
||||
world.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, true);
|
||||
world.setGameRule(GameRule.DO_ENTITY_DROPS, true);
|
||||
world.setGameRule(GameRule.DO_FIRE_TICK, true);
|
||||
world.setGameRule(GameRule.DO_INSOMNIA, false);
|
||||
world.setGameRule(GameRule.DO_IMMEDIATE_RESPAWN, false);
|
||||
world.setGameRule(GameRule.DO_LIMITED_CRAFTING, false);
|
||||
world.setGameRule(GameRule.DO_MOB_LOOT, true);
|
||||
world.setGameRule(GameRule.DO_MOB_SPAWNING, true);
|
||||
world.setGameRule(GameRule.DO_PATROL_SPAWNING, true);
|
||||
world.setGameRule(GameRule.DO_TILE_DROPS, true);
|
||||
world.setGameRule(GameRule.DO_TRADER_SPAWNING, false);
|
||||
world.setGameRule(GameRule.DO_WEATHER_CYCLE, true);
|
||||
world.setGameRule(GameRule.DROWNING_DAMAGE, true);
|
||||
world.setGameRule(GameRule.FALL_DAMAGE, true);
|
||||
world.setGameRule(GameRule.FIRE_DAMAGE, true);
|
||||
world.setGameRule(GameRule.KEEP_INVENTORY, false);
|
||||
world.setGameRule(GameRule.LOG_ADMIN_COMMANDS, true);
|
||||
world.setGameRule(GameRule.MOB_GRIEFING, true);
|
||||
world.setGameRule(GameRule.NATURAL_REGENERATION, true);
|
||||
world.setGameRule(GameRule.REDUCED_DEBUG_INFO, true);
|
||||
world.setGameRule(GameRule.SEND_COMMAND_FEEDBACK, true);
|
||||
world.setGameRule(GameRule.SHOW_DEATH_MESSAGES, true);
|
||||
world.setGameRule(GameRule.SPECTATORS_GENERATE_CHUNKS, false);
|
||||
|
||||
// DEBUG specific Settings
|
||||
if (this.config.getBoolean("Varo.Debug")) {
|
||||
world.setDifficulty(Difficulty.PEACEFUL);
|
||||
world.setGameRule(GameRule.DO_DAYLIGHT_CYCLE, false);
|
||||
world.setGameRule(GameRule.DO_WEATHER_CYCLE, false);
|
||||
}
|
||||
}
|
||||
getServer().removeRecipe(NamespacedKey.minecraft("fishing_rod"));
|
||||
}
|
||||
|
|
|
@ -50,6 +50,8 @@ public class PlayerJoinQuitListener implements Listener {
|
|||
e.getPlayer().sendMessage("\n§7§l#### §9Cliffbreak.de - §lVaro §r§9Changelog §7§l####\n \n"
|
||||
+ " §cWarning: §r§c Plugin is running in DEBUG mode!\n ");
|
||||
|
||||
if (!(e.getPlayer().getName().equals("AragurLP") || e.getPlayer().getName().equals("AragurTV"))) {
|
||||
|
||||
final Stack<String> changes = new Stack<String>();
|
||||
|
||||
changes.push(" §7• §r§lADD: §rAdd /varo portal to allow Operators to create a Portal");
|
||||
|
@ -89,6 +91,7 @@ public class PlayerJoinQuitListener implements Listener {
|
|||
}.runTaskTimer(plugin, 20, 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onServerListPing(final ServerListPingEvent event) {
|
||||
|
|
Loading…
Reference in a new issue