diff options
author | KHobbits <rob@khobbits.co.uk> | 2011-08-23 15:37:09 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2011-08-23 15:37:09 +0100 |
commit | 7df5098bf687fa41193135ecff1ca4f68b0c174d (patch) | |
tree | 2683ca5a46c37d4b80425a56319c223fe5e8c04b | |
parent | 27adc214464367fe795715d2244934eecd7fef16 (diff) | |
download | Essentials-7df5098bf687fa41193135ecff1ca4f68b0c174d.tar Essentials-7df5098bf687fa41193135ecff1ca4f68b0c174d.tar.gz Essentials-7df5098bf687fa41193135ecff1ca4f68b0c174d.tar.lz Essentials-7df5098bf687fa41193135ecff1ca4f68b0c174d.tar.xz Essentials-7df5098bf687fa41193135ecff1ca4f68b0c174d.zip |
Homes tolower.
Max homes fix.
5 files changed, 10 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java index c5d590e14..aeb90c806 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsUpgrade.java @@ -282,11 +282,12 @@ public class EssentialsUpgrade final String defworld = (String)config.getProperty("home.default"); final Location defloc = config.getLocation("home.worlds." + defworld, ess.getServer()); - String worldName = defloc.getWorld().getName().toLowerCase(); + ; config.setProperty("homes.home", defloc); List<String> worlds = config.getKeys("home.worlds"); Location loc; + String worldName; if (worlds == null) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java index 7385268d9..7badbf969 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanddelhome.java @@ -36,7 +36,7 @@ public class Commanddelhome extends EssentialsCommand user = getPlayer(server, args, 0); name = args[1]; } - user.delHome(name); - sender.sendMessage(Util.format("deleteHome", args[0])); + user.delHome(name.toLowerCase()); + sender.sendMessage(Util.format("deleteHome", name)); } } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index b06dec10b..3e4ee6178 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -40,7 +40,7 @@ public class Commandhome extends EssentialsCommand } try { - user.getTeleport().home(u, homeName, charge); + user.getTeleport().home(u, homeName.toLowerCase(), charge); } catch (NotEnoughArgumentsException e) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java index 5461172d3..594804de0 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java @@ -21,10 +21,10 @@ public class Commandsethome extends EssentialsCommand { if (user.isAuthorized("essentials.sethome.multiple")) { - if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() <= ess.getSettings().getMultipleHomes()) - || (user.getHomes().contains(args[0]))) + if ((user.isAuthorized("essentials.sethome.multiple.unlimited")) || (user.getHomes().size() < ess.getSettings().getMultipleHomes()) + || (user.getHomes().contains(args[0].toLowerCase()))) { - user.setHome(args[0]); + user.setHome(args[0].toLowerCase()); } else { @@ -46,7 +46,7 @@ public class Commandsethome extends EssentialsCommand { throw new Exception(Util.i18n("playerNotFound")); } - usersHome.setHome(args[1], user.getLocation()); + usersHome.setHome(args[1].toLowerCase(), user.getLocation()); } } } diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index fc5dd8553..a58a1e70d 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -21,6 +21,7 @@ public class EssentialsSign { private static final Set<Material> EMPTY_SET = new HashSet<Material>(); protected transient final String signName; + //TODO: Add these settings to messages private static final String FORMAT_SUCCESS = "§1[%s]"; private static final String FORMAT_TEMPLATE = "[%s]"; private static final String FORMAT_FAIL = "§4[%s]"; |