diff --git a/src/com/massivecraft/factions/entity/MConf.java b/src/com/massivecraft/factions/entity/MConf.java index 9a1060dd..fd8a6524 100644 --- a/src/com/massivecraft/factions/entity/MConf.java +++ b/src/com/massivecraft/factions/entity/MConf.java @@ -3,6 +3,7 @@ package com.massivecraft.factions.entity; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; +import java.util.TreeSet; import org.bukkit.ChatColor; import org.bukkit.event.EventPriority; @@ -131,8 +132,28 @@ public class MConf extends Entity public Set playersWhoBypassAllProtection = new LinkedHashSet(); public Set worldsNoClaiming = new LinkedHashSet(); + public Set getWorldsNoClaiming() + { + Set ret = new TreeSet(String.CASE_INSENSITIVE_ORDER); + ret.addAll(this.worldsNoClaiming); + return ret; + } + public Set worldsNoPowerLoss = new LinkedHashSet(); + public Set getWorldsNoPowerLoss() + { + Set ret = new TreeSet(String.CASE_INSENSITIVE_ORDER); + ret.addAll(this.worldsNoPowerLoss); + return ret; + } + public Set worldsIgnorePvP = new LinkedHashSet(); + public Set getWorldsIgnlorePvP() + { + Set ret = new TreeSet(String.CASE_INSENSITIVE_ORDER); + ret.addAll(this.worldsIgnorePvP); + return ret; + } // -------------------------------------------- // // EXPLOITS diff --git a/src/com/massivecraft/factions/entity/UPlayer.java b/src/com/massivecraft/factions/entity/UPlayer.java index 07a3bd8e..869f6ae4 100644 --- a/src/com/massivecraft/factions/entity/UPlayer.java +++ b/src/com/massivecraft/factions/entity/UPlayer.java @@ -679,7 +679,7 @@ public class UPlayer extends SenderEntity implements EconomyParticipato { if (newFaction.isNormal()) { - if (mconf.worldsNoClaiming.contains(ps.getWorld())) + if (mconf.getWorldsNoClaiming().contains(ps.getWorld())) { msg("Sorry, this world has land claiming disabled."); return false; diff --git a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java index 1671c021..0fc1d31d 100644 --- a/src/com/massivecraft/factions/listeners/FactionsListenerMain.java +++ b/src/com/massivecraft/factions/listeners/FactionsListenerMain.java @@ -201,7 +201,7 @@ public class FactionsListenerMain implements Listener return; } - if (MConf.get().worldsNoPowerLoss.contains(player.getWorld().getName())) + if (MConf.get().getWorldsNoPowerLoss().contains(player.getWorld().getName())) { uplayer.msg("You didn't lose any power due to the world you died in."); return; @@ -333,7 +333,7 @@ public class FactionsListenerMain implements Listener } // ... are PVP rules completely ignored in this world? ... - if (MConf.get().worldsIgnorePvP.contains(defenderPs.getWorld())) return true; + if (MConf.get().getWorldsIgnlorePvP().contains(defenderPs.getWorld())) return true; Faction defendFaction = udefender.getFaction(); Faction attackFaction = uattacker.getFaction();