I saved this problem using Base64 encoding as follows:
@Override
public Document save() {
final Inventory inventory = this.player.getInventory();
return new Document()
.append("_id", this.player.getUniqueId().toString())
.append("contents"...
Hi,
I'm currently working on a Folia 1.21.4 project in which I work with a MongoDB connection that I use to store player's serialized inventories.
Here are the methods I'm using to convert ItemStack to MongoDB Document instances and vice-versa:
@Override
public Document save() {
final...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.