Skip to main content

Player Storage

BaseIO provides an easy way to store data for the players. To use this feature just create a new class extending com.unitedworldminers.BaseIO.storage.PlayerStorage. This will be your storage class. Every player will have an instance of this class. You have to implement void onNewUser(), this method will be called everytime BaseIO has to create a new user. With getUUID() you can always retrieve the players UUID. onNewUser allows to throw a NewInstanceException when you don't want to create a storage for that user. But be warned, when retrieving userdata you will have to check for null storages.

To now save some values you just create your fields in your storage class. Every field in that class will be stored, if you don't want this you can give the transistent attribute to that field.

To