// Sets the next location in the list as active. public void cycle() { switch (mode) { case TELEPORT: ++currentLocation; if (currentLocation >= locations.size()) { currentLocation = 0; } break; case SPAWN: this.mob = CreatureType.values()[ mobIndex >= CreatureType.values().length ? (mobIndex = 0) : ++mobIndex]; break; case TIME: String time = this.time; String newTime = ""; if (time.equals("morning")) { newTime = "day"; } else if (time.equals("day")) { newTime = "afternoon"; } else if (time.equals("afternoon")) { newTime = "night"; } else if (time.equals("night")) { newTime = "morning"; } this.time = newTime; break; } }
public Map<String, Boolean> getEpGuardSettings() { final Map<String, Boolean> epSettings = new HashMap<String, Boolean>(); epSettings.put( "protect.prevent.lava-flow", config.getBoolean("protect.prevent.lava-flow", false)); epSettings.put( "protect.prevent.water-flow", config.getBoolean("protect.prevent.water-flow", false)); epSettings.put( "protect.prevent.water-bucket-flow", config.getBoolean("protect.prevent.water-bucket-flow", false)); epSettings.put( "protect.prevent.fire-spread", config.getBoolean("protect.prevent.fire-spread", true)); epSettings.put( "protect.prevent.flint-fire", config.getBoolean("protect.prevent.flint-fire", false)); epSettings.put( "protect.prevent.portal-creation", config.getBoolean("protect.prevent.portal-creation", false)); epSettings.put( "protect.prevent.lava-fire-spread", config.getBoolean("protect.prevent.lava-fire-spread", true)); epSettings.put( "protect.prevent.tnt-explosion", config.getBoolean("protect.prevent.tnt-explosion", false)); epSettings.put( "protect.prevent.creeper-explosion", config.getBoolean("protect.prevent.creeper-explosion", false)); epSettings.put( "protect.prevent.creeper-playerdamage", config.getBoolean("protect.prevent.creeper-playerdamage", false)); epSettings.put( "protect.prevent.creeper-blockdamage", config.getBoolean("protect.prevent.creeper-blockdamage", false)); epSettings.put( "protect.prevent.entitytarget", config.getBoolean("protect.prevent.entitytarget", false)); for (CreatureType ct : CreatureType.values()) { final String name = ct.toString().toLowerCase(); epSettings.put( "protect.prevent.spawn." + name, config.getBoolean("protect.prevent.spawn." + name, false)); } epSettings.put( "protect.prevent.lightning-fire-spread", config.getBoolean("protect.prevent.lightning-fire-spread", true)); return epSettings; }