mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-03 22:11:42 +01:00
Use lower locale.
This commit is contained in:
parent
9ff0571cea
commit
56bd973e94
@ -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
|
||||
|
@ -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"));
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user