mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-06 23:52:31 +01:00
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
@ -228,4 +228,12 @@ public final class CraftItemFactory implements ItemFactory {
|
|||||||
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
return io.papermc.paper.adventure.PaperAdventure.asAdventure(CraftItemStack.asNMSCopy(itemStack).getDisplayName());
|
||||||
}
|
}
|
||||||
// Paper end - Adventure
|
// 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…
Reference in New Issue
Block a user