Fix missing closing bracket in addEnchantment. Fixes BUKKIT-4126

Prior to this commit the message would display as "...(given #, bounds
are # to #". This commit changes that by adding the missing bracket to
the end of the statement. This is strictly a visual error.

By: ST-DDT <ST-DDT@gmx.de>
This commit is contained in:
Bukkit/Spigot 2013-04-20 16:55:23 +03:00
parent fd0b9b4a0d
commit c648e5402c

View File

@ -411,7 +411,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable {
public void addEnchantment(Enchantment ench, int level) {
Validate.notNull(ench, "Enchantment cannot be null");
if ((level < ench.getStartLevel()) || (level > ench.getMaxLevel())) {
throw new IllegalArgumentException("Enchantment level is either too low or too high (given " + level + ", bounds are " + ench.getStartLevel() + " to " + ench.getMaxLevel());
throw new IllegalArgumentException("Enchantment level is either too low or too high (given " + level + ", bounds are " + ench.getStartLevel() + " to " + ench.getMaxLevel() + ")");
} else if (!ench.canEnchantItem(this)) {
throw new IllegalArgumentException("Specified enchantment cannot be applied to this itemstack");
}