fix possible errors when mending is unsafely enchanted on something it wasn't supposed to be enchanted on
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>me.youhavetrouble</groupId>
|
||||
<artifactId>MendingBeGone</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.3.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>MendingBeGone</name>
|
||||
|
||||
@@ -75,7 +75,7 @@ public final class MendingBeGone extends JavaPlugin implements Listener {
|
||||
itemStack.removeEnchantment(Enchantment.MENDING);
|
||||
if (itemStack.containsEnchantment(Enchantment.DURABILITY))
|
||||
itemStack.removeEnchantment(Enchantment.DURABILITY);
|
||||
itemStack.addEnchantment(Enchantment.DURABILITY, 3);
|
||||
itemStack.addUnsafeEnchantment(Enchantment.DURABILITY, 3);
|
||||
}
|
||||
if (!Material.ENCHANTED_BOOK.equals(itemStack.getType())) return;
|
||||
ItemMeta meta = itemStack.getItemMeta();
|
||||
|
||||
Reference in New Issue
Block a user