public class Encapsulation { private UUID uuid; private int level, xp; //Constructor which puts all the data into the variables. public Encapsulation(UUID uuid, int level, int xp) { this.uuid = uuid; this.level = level; this.xp = xp; } //Simply get data. public int getLevel() { return level; } public UUID getUuid() { return uuid; } public int getXp() { return xp; } //Simply set data. public void setUuid(UUID uuid) { this.uuid = uuid; } public void setLevel(int level) { this.level = level; } public void setXp(int xp) { this.xp = xp; } //We will use this for serialization @Override public String toString() { return uuid.toString() + ":" + level + ":" + xp; } }