GlowServer server = (GlowServer) Bukkit.getServer(); boolean allowAnimals = world.getAllowAnimals() && server.getAnimalsSpawnEnabled(); boolean allowMonsters = world.getAllowMonsters() && server.getMonstersSpawnEnabled(); if (entityTypes.length == 0) { return;
this.allowMonsters = world.getAllowMonsters(); this.allowAnimals = world.getAllowAnimals();
message.add(new FancyHeader("Monster Settings", colors)); message.add(new FancyMessage("Multiverse Setting: ", world.canMonstersSpawn() + "", colors)); message.add(new FancyMessage("Bukkit Setting: ", world.getCBWorld().getAllowMonsters() + "", colors)); if (world.getMonsterList().size() > 0) { if (world.canMonstersSpawn()) {
public ArenaListener(Arena arena, MobArena plugin) { this.plugin = plugin; this.arena = arena; this.region = arena.getRegion(); this.monsters = arena.getMonsterManager(); /* * TODO: Figure out if this is really a good idea + It saves needing all * those methods in Arena.java + It is relatively simple + It would be * fairly easy to implement an observer pattern - More private fields - * Uglier code */ ConfigurationSection s = arena.getSettings(); this.softRestore = s.getBoolean("soft-restore", false); this.softRestoreDrops = s.getBoolean("soft-restore-drops", false); this.protect = s.getBoolean("protect", true); this.monsterExp = s.getBoolean("monster-exp", false); this.monsterInfight = s.getBoolean("monster-infight", false); this.pvpOn = s.getBoolean("pvp-enabled", false); this.foodRegen = s.getBoolean("food-regen", false); this.lockFoodLevel = s.getBoolean("lock-food-level", true); this.allowTeleport = s.getBoolean("allow-teleporting", false); this.canShare = s.getBoolean("share-items-in-arena", true); this.autoIgniteTNT = s.getBoolean("auto-ignite-tnt", false); this.useClassChests = s.getBoolean("use-class-chests", false); this.classLimits = arena.getClassLimitManager(); this.allowMonsters = arena.getWorld().getAllowMonsters(); this.banned = new HashSet<>(); }
spawning.append("Monsters?", world.getAllowMonsters()); spawning.append("Ambient Spawn Limit", world.getAmbientSpawnLimit()); spawning.append("Animal Spawn Limit", world.getAnimalSpawnLimit());