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.
This commit is contained in:
ST-DDT 2013-04-20 16:55:23 +03:00 committed by Travis Ralston
parent eedcead5c4
commit ed364a7ef7

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");
}