diff options
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandgive.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandgive.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java index 2c0a66d60..057e8fca9 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandgive.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandgive.java @@ -2,6 +2,7 @@ package com.earth2me.essentials.commands; import com.earth2me.essentials.api.IUser; import com.earth2me.essentials.perm.GivePermissions; +import static com.earth2me.essentials.I18n._; import java.util.Locale; import org.bukkit.ChatColor; import org.bukkit.Material; @@ -29,8 +30,8 @@ public class Commandgive extends EssentialsCommand final String itemname = stack.getType().toString().toLowerCase(Locale.ENGLISH).replace("_", ""); if (!GivePermissions.getPermission(stack.getType()).isAuthorized(sender)) { - throw new Exception(ChatColor.RED + "You are not allowed to spawn the item " + itemname); - } + throw new Exception(_("cantSpawnItem", itemname)); + } if (args.length > 2 && Integer.parseInt(args[2]) > 0) { @@ -62,7 +63,7 @@ public class Commandgive extends EssentialsCommand if (stack.getType() == Material.AIR) { - throw new Exception(ChatColor.RED + "You can't give air."); + throw new Exception(_("cantSpawnItem", "Air")); } giveTo.giveItems(stack, false); |