Hi! I am making a plugin that generates a custom world, and I want the players to have an indenpendent inventory in this world (which means, when a player enters this world, they will have a new inventory, and will switch back as long as they leave).
The problem is that if I implement this feature by myself, there may be some special cases which will make a mess:
So I would like to ask what is the most elegant solution, thank you!
The problem is that if I implement this feature by myself, there may be some special cases which will make a mess:
- The player lose their connection in the custom world (this may be solved by using PDC)
- The server shutdown when there're still players in the custom world (this may be solved by using PDC)
- The server restart without my plugin enabled (so the inventory won't recover, which can't be solve by using PDC)
- The world is deleted when the server is not running
- ...
So I would like to ask what is the most elegant solution, thank you!