Use lower locale.

This commit is contained in:
KHobbits 2013-03-10 02:04:11 +00:00
parent 9ff0571cea
commit 56bd973e94
3 changed files with 7 additions and 6 deletions

View File

@ -160,7 +160,7 @@ public class MetaItemStack
final IText input = new BookInput("book", true, ess);
final BookPager pager = new BookPager(input);
if (hasMetaPermission(sender, "chapter", true, true, ess) || hasMetaPermission(sender, "chapter-" + split[1].toLowerCase(), true, true, ess))
if (hasMetaPermission(sender, "chapter", true, true, ess) || hasMetaPermission(sender, "chapter-" + split[1].toLowerCase(Locale.ENGLISH), true, true, ess))
{
List<String> pages = pager.getPages(split[1]);
meta.setPages(pages);
@ -349,7 +349,7 @@ public class MetaItemStack
pEffectType = Potions.getByName(split[1]);
if (pEffectType != null && pEffectType.getName() != null)
{
if (hasMetaPermission(sender, "potions." + pEffectType.getName().toLowerCase(), false, false, ess))
if (hasMetaPermission(sender, "potions." + pEffectType.getName().toLowerCase(Locale.ENGLISH), false, false, ess))
{
validPotionEffect = true;
canceledEffect = false;
@ -357,7 +357,7 @@ public class MetaItemStack
else
{
canceledEffect = true;
sender.sendMessage(_("invalidPotionEffect", pEffectType.getName().toLowerCase()));
sender.sendMessage(_("invalidPotionEffect", pEffectType.getName().toLowerCase(Locale.ENGLISH)));
}
}
else

View File

@ -24,7 +24,7 @@ public class SpawnMob
final Set<String> availableList = new HashSet<String>();
for (String mob : mobList)
{
if (user.isAuthorized("essentials.spawnmob." + mob.toLowerCase()))
if (user.isAuthorized("essentials.spawnmob." + mob.toLowerCase(Locale.ENGLISH)))
{
availableList.add(mob);
}
@ -166,7 +166,7 @@ public class SpawnMob
throw new Exception(_("disabledToSpawnMob"));
}
if (sender instanceof User && !((User)sender).isAuthorized("essentials.spawnmob." + mob.name.toLowerCase()))
if (sender instanceof User && !((User)sender).isAuthorized("essentials.spawnmob." + mob.name.toLowerCase(Locale.ENGLISH)))
{
throw new Exception(_("noPermToSpawnMob"));
}

View File

@ -2,6 +2,7 @@ package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.Locale;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.Server;
@ -27,7 +28,7 @@ public class Commandsudo extends EssentialsCommand
}
final User user = getPlayer(server, args, 0, false);
if(args[1].toLowerCase().startsWith("c:"))
if(args[1].toLowerCase(Locale.ENGLISH).startsWith("c:"))
{
if (user.isAuthorized("essentials.sudo.exempt") && sender instanceof Player)
{