geforkt von Mirrors/Paper
Update enchantment handling to 1.4.6. Fixes BUKKIT-3256
By: feildmaster <admin@feildmaster.com>
Dieser Commit ist enthalten in:
Ursprung
a04364f6a7
Commit
f23414917d
@ -1,6 +1,6 @@
|
|||||||
package org.bukkit.craftbukkit.enchantments;
|
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.Enchantment;
|
||||||
import org.bukkit.enchantments.EnchantmentTarget;
|
import org.bukkit.enchantments.EnchantmentTarget;
|
||||||
import org.bukkit.enchantments.EnchantmentWrapper;
|
import org.bukkit.enchantments.EnchantmentWrapper;
|
||||||
@ -52,7 +52,7 @@ public class CraftEnchantment extends Enchantment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canEnchantItem(ItemStack item) {
|
public boolean canEnchantItem(ItemStack item) {
|
||||||
return target.slot.canEnchant(Item.byId[item.getTypeId()]);
|
return target.canEnchant(CraftItemStack.asNMSCopy(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren