diff options
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commanditem.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commanditem.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java index 35b3c09ae..3bd35353a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commanditem.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commanditem.java @@ -1,7 +1,8 @@ package com.earth2me.essentials.commands; +import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.User; -import com.earth2me.essentials.Util; +import java.util.Locale; import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.inventory.ItemStack; @@ -23,7 +24,7 @@ public class Commanditem extends EssentialsCommand } final ItemStack stack = ess.getItemDb().get(args[0]); - final String itemname = stack.getType().toString().toLowerCase().replace("_", ""); + final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""); if (ess.getSettings().permissionBasedItemSpawn() ? (!user.isAuthorized("essentials.itemspawn.item-all") && !user.isAuthorized("essentials.itemspawn.item-" + itemname) @@ -31,7 +32,7 @@ public class Commanditem extends EssentialsCommand : (!user.isAuthorized("essentials.itemspawn.exempt") && !user.canSpawnItem(stack.getTypeId()))) { - throw new Exception(Util.format("cantSpawnItem", itemname)); + throw new Exception(_("cantSpawnItem", itemname)); } if (args.length > 1 && Integer.parseInt(args[1]) > 0) @@ -41,11 +42,11 @@ public class Commanditem extends EssentialsCommand if (stack.getType() == Material.AIR) { - throw new Exception(Util.format("cantSpawnItem", "Air")); + throw new Exception(_("cantSpawnItem", "Air")); } - final String displayName = stack.getType().toString().toLowerCase().replace('_', ' '); - user.sendMessage(Util.format("itemSpawn", stack.getAmount(), displayName)); + final String displayName = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace('_', ' '); + user.sendMessage(_("itemSpawn", stack.getAmount(), displayName)); user.getInventory().addItem(stack); user.updateInventory(); } |