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:
parent
90c776d3aa
commit
11a5eaf367
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue