promotional bannermobile promotional banner
premium banner
Keep your worlds separate - PerWorldInventory (PWI) gives each world its own inventory system!

Description

PerWorldInventory ensures that each world on your server maintains completely separate player inventories. When players switch between worlds, their items are saved and restored.

The mod was written for our own server because we did not want to use proxies and run multiple backends. Instead, we opted to use the already built-in multiworld feature to have multiple worlds with each their own gamemode and own inventories, so inventories from creative or any other game mode don't carry over to our exploration/survival world.

Features:
- complete inventory isolation per world
- handles all world-switching methods (including /tp)
- triple failsafe system: instant save on world change, save on player disconnect and auto-save every 5 minutes
- works out of the box, no configuration needed
- world groups: grouped worlds will share inventories


How it works:
Installation:
- put the PerWorldInventory.jar in your servers /mods folder
- the plugin will initialize and create a /PerWorldInventory folder where players inventories will be stored

Use:
- when a player joins a world, the plugin will check if the player has any stored inventory for that world, or create a new configuration for that player
- if a stored inventory exists, clear the current inventory and load the stored inventory for that world
- on world change, save inventory of current world, clear the inventory and load the stored inventory for the new world
- inventory configurations are stored in /PerWorldInventory/{PlayerUUID}/{worldname}.json
- The JSONs are in a nice readable and editable format, so you can even add or remove items from players inventories
- groups.yml to configure world groups for shared inventories between multiple worlds, useful to create world clusters

This mod works well with:
https://www.curseforge.com/hytale/mods/autogamemode

To-do:
- include equipped Armor into Inventory separation

Like what I do? Buy me a Coffee ☕
Tips are optional, but help me in allocating more time in bringing mods to you and do what I love.