From 43f9f304a63425fa902a8dfec6c678e32e35a921 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Thu, 29 Aug 2013 10:48:17 +0200 Subject: [PATCH] The enum sets are no longer final constants. Thus we should use camel case instead. --- src/com/massivecraft/factions/entity/MConf.java | 10 +++++----- .../factions/listeners/FactionsListenerMain.java | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 40112b65..77ad4956 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -184,7 +184,7 @@ public class MConf extends Entity // ENUMERATIONS // -------------------------------------------- // - public Set MATERIALS_EDIT_ON_INTERACT = MUtil.set( + public Set materialsEditOnInteract = MUtil.set( Material.DIODE_BLOCK_OFF, Material.DIODE_BLOCK_ON, Material.NOTE_BLOCK, @@ -192,7 +192,7 @@ public class MConf extends Entity Material.SOIL ); - public Set MATERIALS_EDIT_TOOLS = MUtil.set( + public Set materialsEditTools = MUtil.set( Material.FIREBALL, Material.FLINT_AND_STEEL, Material.BUCKET, @@ -200,13 +200,13 @@ public class MConf extends Entity Material.LAVA_BUCKET ); - public Set MATERIALS_DOOR = MUtil.set( + public Set materialsDoor = MUtil.set( Material.WOODEN_DOOR, Material.TRAP_DOOR, Material.FENCE_GATE ); - public Set MATERIALS_CONTAINER = MUtil.set( + public Set materialsContainer = MUtil.set( Material.DISPENSER, Material.CHEST, Material.FURNACE, @@ -221,7 +221,7 @@ public class MConf extends Entity Material.DROPPER ); - public Set ENTITY_TYPES_MONSTERS = MUtil.set( + public Set entityTypesMonsters = MUtil.set( EntityType.BLAZE, EntityType.CAVE_SPIDER, EntityType.CREEPER, diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java index a59c389e..2332f804 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java @@ -519,7 +519,7 @@ public class FactionsListenerMain implements Listener public void blockMonsters(CreatureSpawnEvent event) { // If a monster is spawning ... - if ( ! MConf.get().ENTITY_TYPES_MONSTERS.contains(event.getEntityType())) return; + if ( ! MConf.get().entityTypesMonsters.contains(event.getEntityType())) return; // Check Disabled if (UConf.isDisabled(event.getLocation())) return; @@ -537,7 +537,7 @@ public class FactionsListenerMain implements Listener public void blockMonsters(EntityTargetEvent event) { // If a monster ... - if ( ! MConf.get().ENTITY_TYPES_MONSTERS.contains(event.getEntityType())) return; + if ( ! MConf.get().entityTypesMonsters.contains(event.getEntityType())) return; // ... is targeting something ... Entity target = event.getTarget(); @@ -866,7 +866,7 @@ public class FactionsListenerMain implements Listener // TODO: Possibly incorporate pain build... public static boolean playerCanUseItemHere(Player player, PS ps, Material material, boolean justCheck) { - if (!MConf.get().MATERIALS_EDIT_TOOLS.contains(material)) return true; + if (!MConf.get().materialsEditTools.contains(material)) return true; String name = player.getName(); if (MConf.get().playersWhoBypassAllProtection.contains(name)) return true; @@ -888,9 +888,9 @@ public class FactionsListenerMain implements Listener PS ps = PS.valueOf(block); Material material = block.getType(); - if (MConf.get().MATERIALS_EDIT_ON_INTERACT.contains(material) && ! FPerm.BUILD.has(me, ps, ! justCheck)) return false; - if (MConf.get().MATERIALS_CONTAINER.contains(material) && ! FPerm.CONTAINER.has(me, ps, ! justCheck)) return false; - if (MConf.get().MATERIALS_DOOR.contains(material) && ! FPerm.DOOR.has(me, ps, ! justCheck)) return false; + if (MConf.get().materialsEditOnInteract.contains(material) && ! FPerm.BUILD.has(me, ps, ! justCheck)) return false; + if (MConf.get().materialsContainer.contains(material) && ! FPerm.CONTAINER.has(me, ps, ! justCheck)) return false; + if (MConf.get().materialsDoor.contains(material) && ! FPerm.DOOR.has(me, ps, ! justCheck)) return false; if (material == Material.STONE_BUTTON && ! FPerm.BUTTON.has(me, ps, ! justCheck)) return false; if (material == Material.LEVER && ! FPerm.LEVER.has(me, ps, ! justCheck)) return false; return true;