Merge branch 'master' of https://github.com/AuthMe-Team/AuthMeReloaded into 432-remove-public-ip-map

This commit is contained in:
ljacqu
2016-03-06 14:42:32 +01:00
11 changed files with 88 additions and 86 deletions
@@ -35,29 +35,6 @@ public class JsonCache {
.create();
}
public void createCache(Player player, PlayerData playerData) {
if (player == null) {
return;
}
String name = player.getName().toLowerCase();
File file = new File(cacheDir, name + File.separator + "cache.json");
if (file.exists()) {
return;
}
if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) {
return;
}
try {
String data = gson.toJson(playerData);
Files.touch(file);
Files.write(data, file, Charsets.UTF_8);
} catch (IOException e) {
ConsoleLogger.writeStackTrace(e);
}
}
public PlayerData readCache(Player player) {
String name = player.getName().toLowerCase();
File file = new File(cacheDir, name + File.separator + "cache.json");