Add Raw Byte ItemStack Serialization

Serializes using NBT which is safer for server data migrations than bukkits format.

Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
This commit is contained in:
Mariell Hoversholm
2020-04-30 16:56:31 +02:00
parent a690b2a859
commit 21792a6e4b
4 changed files with 123 additions and 0 deletions

View File

@@ -164,5 +164,9 @@ public interface UnsafeValues {
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
}
byte[] serializeItem(ItemStack item);
ItemStack deserializeItem(byte[] data);
// Paper end
}