The enum sets are no longer final constants. Thus we should use camel case instead.

This commit is contained in:
Olof Larsson 2013-08-29 10:48:17 +02:00
parent 593dc652bb
commit 43f9f304a6
2 changed files with 11 additions and 11 deletions

View File

@ -184,7 +184,7 @@ public class MConf extends Entity<MConf>
// ENUMERATIONS
// -------------------------------------------- //
public Set<Material> MATERIALS_EDIT_ON_INTERACT = MUtil.set(
public Set<Material> materialsEditOnInteract = MUtil.set(
Material.DIODE_BLOCK_OFF,
Material.DIODE_BLOCK_ON,
Material.NOTE_BLOCK,
@ -192,7 +192,7 @@ public class MConf extends Entity<MConf>
Material.SOIL
);
public Set<Material> MATERIALS_EDIT_TOOLS = MUtil.set(
public Set<Material> materialsEditTools = MUtil.set(
Material.FIREBALL,
Material.FLINT_AND_STEEL,
Material.BUCKET,
@ -200,13 +200,13 @@ public class MConf extends Entity<MConf>
Material.LAVA_BUCKET
);
public Set<Material> MATERIALS_DOOR = MUtil.set(
public Set<Material> materialsDoor = MUtil.set(
Material.WOODEN_DOOR,
Material.TRAP_DOOR,
Material.FENCE_GATE
);
public Set<Material> MATERIALS_CONTAINER = MUtil.set(
public Set<Material> materialsContainer = MUtil.set(
Material.DISPENSER,
Material.CHEST,
Material.FURNACE,
@ -221,7 +221,7 @@ public class MConf extends Entity<MConf>
Material.DROPPER
);
public Set<EntityType> ENTITY_TYPES_MONSTERS = MUtil.set(
public Set<EntityType> entityTypesMonsters = MUtil.set(
EntityType.BLAZE,
EntityType.CAVE_SPIDER,
EntityType.CREEPER,

View File

@ -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;