3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 13:00:06 +01:00

Update enchantment handling to 1.4.6. Fixes BUKKIT-3256

Dieser Commit ist enthalten in:
feildmaster 2012-12-21 18:52:39 -06:00
Ursprung f71be2506d
Commit ec211ed952

Datei anzeigen

@ -1,6 +1,6 @@
package org.bukkit.craftbukkit.enchantments;
import net.minecraft.server.Item;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.enchantments.EnchantmentTarget;
import org.bukkit.enchantments.EnchantmentWrapper;
@ -52,7 +52,7 @@ public class CraftEnchantment extends Enchantment {
@Override
public boolean canEnchantItem(ItemStack item) {
return target.slot.canEnchant(Item.byId[item.getTypeId()]);
return target.canEnchant(CraftItemStack.asNMSCopy(item));
}
@Override