Skip to main content

DataUtils

DataUtils is a class designed to load and save all data from or to a file (e.g. PlayerIO is based on it) and is frankly just a wrapper for Google's gson project, adding some Minecraft-related type adapters.

Simple setup

In the most simple way you save your object by just calling DataUtils.saveData(Object, Type, String).
The string is the filename where the data should be saved (a file object will be created based on the string).
The type object has to be the type of the Object to save. If your object has no generics you can useĀ