diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-27 06:23:07 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-27 06:23:07 +0100 |
commit | 3c71ae4cd96b38f7368c062281b8546a86773949 (patch) | |
tree | 8215b6641903bc79f333dc430bac79ab493f66e4 | |
parent | 34edf34ba3710b074a95c8b76434a75ed4b5dd2f (diff) | |
download | Essentials-3c71ae4cd96b38f7368c062281b8546a86773949.tar Essentials-3c71ae4cd96b38f7368c062281b8546a86773949.tar.gz Essentials-3c71ae4cd96b38f7368c062281b8546a86773949.tar.lz Essentials-3c71ae4cd96b38f7368c062281b8546a86773949.tar.xz Essentials-3c71ae4cd96b38f7368c062281b8546a86773949.zip |
Locale.ENGLISH!!1!
10 files changed, 19 insertions, 15 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 5e6b7ca13..b07c9710f 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -5,6 +5,7 @@ import java.io.*; import java.util.Collections; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; @@ -234,7 +235,7 @@ public class EssentialsConf extends Configuration List<String> enchants = getKeys(path + ".enchant"); for (String enchant : enchants) { - Enchantment enchantment = Enchantment.getByName(enchant); + Enchantment enchantment = Enchantment.getByName(enchant.toUpperCase(Locale.ENGLISH)); if (enchantment == null) { continue; } @@ -260,7 +261,7 @@ public class EssentialsConf extends Configuration Map<String, Integer> enchant = new HashMap<String, Integer>(); for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) { - enchant.put(entry.getKey().getName(), entry.getValue()); + enchant.put(entry.getKey().getName().toLowerCase(Locale.ENGLISH), entry.getValue()); } map.put("enchant", enchant); } diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java index ab5b0a364..4fa67a72a 100644 --- a/Essentials/src/com/earth2me/essentials/Settings.java +++ b/Essentials/src/com/earth2me/essentials/Settings.java @@ -234,7 +234,7 @@ public class Settings implements ISettings try { - return ChatColor.valueOf(colorName.toUpperCase()); + return ChatColor.valueOf(colorName.toUpperCase(Locale.ENGLISH)); } catch (IllegalArgumentException ex) { diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java index f4a653ce3..8f432ca6e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandeco.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandeco.java @@ -1,6 +1,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.User; +import java.util.Locale; import org.bukkit.Server; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -24,7 +25,7 @@ public class Commandeco extends EssentialsCommand double amount; try { - cmd = EcoCommands.valueOf(args[0].toUpperCase()); + cmd = EcoCommands.valueOf(args[0].toUpperCase(Locale.ENGLISH)); amount = Double.parseDouble(args[2].replaceAll("[^0-9\\.]", "")); } catch (Exception ex) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandenchant.java b/Essentials/src/com/earth2me/essentials/commands/Commandenchant.java index 107727e32..ed0a98fd1 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandenchant.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandenchant.java @@ -68,7 +68,7 @@ public class Commandenchant extends EssentialsCommand final Set<String> enchantmentslist = new TreeSet<String>(); for (Map.Entry<String, Enchantment> entry : ENCHANTMENTS.entrySet()) { - final String enchantmentName = entry.getValue().getName().toLowerCase(); + final String enchantmentName = entry.getValue().getName().toLowerCase(Locale.ENGLISH); if (enchantmentslist.contains(enchantmentName) || user.isAuthorized("essentials.enchant." + enchantmentName)) { enchantmentslist.add(entry.getKey()); @@ -98,7 +98,7 @@ public class Commandenchant extends EssentialsCommand { throw new Exception(_("enchantmentNotFound")); } - final String enchantmentName = enchantment.getName().toLowerCase(); + final String enchantmentName = enchantment.getName().toLowerCase(Locale.ENGLISH); if (!user.isAuthorized("essentials.enchant." + enchantmentName)) { throw new Exception(_("enchantmentPerm", enchantmentName)); diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java index 14fa3dca3..66c6b4414 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandspawnmob.java @@ -205,7 +205,7 @@ public class Commandspawnmob extends EssentialsCommand } else { - ((Sheep)spawned).setColor(DyeColor.valueOf(data.toUpperCase())); + ((Sheep)spawned).setColor(DyeColor.valueOf(data.toUpperCase(Locale.ENGLISH))); } } catch (Exception e) diff --git a/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java b/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java index da636bf71..c260b3bde 100644 --- a/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java +++ b/Essentials/src/com/earth2me/essentials/storage/YamlStorageWriter.java @@ -219,12 +219,12 @@ public class YamlStorageWriter implements IStorageWriter } else if (data instanceof Material) { - writer.println(data.toString().toLowerCase()); + writer.println(data.toString().toLowerCase(Locale.ENGLISH)); } else if (data instanceof MaterialData) { final MaterialData matData = (MaterialData)data; - writer.println(matData.getItemType().toString().toLowerCase() + writer.println(matData.getItemType().toString().toLowerCase(Locale.ENGLISH) + (matData.getData() > 0 ? ":" + matData.getData() : "")); } else if (data instanceof ItemStack) @@ -271,12 +271,12 @@ public class YamlStorageWriter implements IStorageWriter } else if (data instanceof Material) { - writer.print(data.toString().toLowerCase()); + writer.print(data.toString().toLowerCase(Locale.ENGLISH)); } else if (data instanceof MaterialData) { final MaterialData matData = (MaterialData)data; - writer.print(matData.getItemType().toString().toLowerCase() + writer.print(matData.getItemType().toString().toLowerCase(Locale.ENGLISH) + (matData.getData() > 0 ? ":" + matData.getData() : "")); } else diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java index 0945fcd93..0a599e88b 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.chat; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; +import java.util.Locale; import java.util.Map; import org.bukkit.Server; import org.bukkit.event.player.PlayerChatEvent; @@ -30,6 +31,6 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer { event.setMessage(event.getMessage().replaceAll("&([0-9a-f])", "\u00a7$1")); } - event.setFormat(ess.getSettings().getChatFormat(user.getGroup()).replace('&', '\u00a7').replace("\u00a7\u00a7", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()).replace("{SHORTWORLDNAME}", user.getWorld().getName().substring(0, 1).toUpperCase())); + event.setFormat(ess.getSettings().getChatFormat(user.getGroup()).replace('&', '\u00a7').replace("\u00a7\u00a7", "&").replace("{DISPLAYNAME}", "%1$s").replace("{GROUP}", user.getGroup()).replace("{MESSAGE}", "%2$s").replace("{WORLDNAME}", user.getWorld().getName()).replace("{SHORTWORLDNAME}", user.getWorld().getName().substring(0, 1).toUpperCase(Locale.ENGLISH))); } } diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java index 363e4ca6e..7789009e1 100644 --- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java +++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.ChargeException; import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; +import java.util.Locale; import java.util.Map; import org.bukkit.Server; import org.bukkit.event.player.PlayerChatEvent; @@ -50,7 +51,7 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer format.append(chatType).append("Format"); StringBuilder errorMsg = new StringBuilder(); - errorMsg.append("notAllowedTo").append(chatType.substring(0, 1).toUpperCase()).append(chatType.substring(1)); + errorMsg.append("notAllowedTo").append(chatType.substring(0, 1).toUpperCase(Locale.ENGLISH)).append(chatType.substring(1)); if (user.isAuthorized(permission.toString())) { diff --git a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java index acdf01b46..28148075f 100755 --- a/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java +++ b/EssentialsUpdate/src/org/jibble/pircbot/PircBot.java @@ -774,7 +774,7 @@ public abstract class PircBot implements ReplyConstants { } } - command = command.toUpperCase(); + command = command.toUpperCase(Locale.ENGLISH); if (sourceNick.startsWith(":")) { sourceNick = sourceNick.substring(1); } diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java index 695969378..72bdb113d 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/XMPPManager.java @@ -187,7 +187,7 @@ public class XMPPManager extends Handler implements MessageListener, ChatManager final String level = config.getString("log-level", "info"); try { - logLevel = Level.parse(level.toUpperCase()); + logLevel = Level.parse(level.toUpperCase(Locale.ENGLISH)); } catch (IllegalArgumentException e) { |