ensureServerConversions API

This will take a Bukkit ItemStack and run it through any conversions a server process would perform on it,
to ensure it meets latest minecraft expectations.
This commit is contained in:
Aikar 2016-05-04 22:43:12 -04:00
parent 90c776d3aa
commit 11a5eaf367

View File

@ -228,4 +228,12 @@ public final class CraftItemFactory implements ItemFactory {
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
}
// Paper end - Adventure
// Paper start - ensure server conversions API
// TODO: DO WE NEED THIS?
@Override
public ItemStack ensureServerConversions(ItemStack item) {
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
}
// Paper end - ensure server conversions API
}