/** * Returns the PlayerPassData if it exists. * * @param username * @return */ public static PlayerPassData getData(String username) { PlayerPassData data = datas.get(username); if (data == null) { data = (PlayerPassData) DataStorageManager.getReccomendedDriver().loadObject(container, username); } return data; }
public void save() { DataStorageManager.getReccomendedDriver().saveObject(container, this); }
/** * Completely removes the data. * * @param username * @return */ public static void deleteData(String username) { PlayerPassData data = datas.remove(username); DataStorageManager.getReccomendedDriver().deleteObject(container, username); if (data != null) ModuleAuth.unRegistered.add(username); }