Touch the file, it works fine now.
This commit is contained in:
parent
b455e20811
commit
609b148157
@ -83,6 +83,8 @@ public class JsonCache {
|
|||||||
LimboPlayer limboPlayer = new LimboPlayer(name, location, operator, group, canFly, walkSpeed);
|
LimboPlayer limboPlayer = new LimboPlayer(name, location, operator, group, canFly, walkSpeed);
|
||||||
try {
|
try {
|
||||||
File file = new File(cacheDir, id + File.separator + "cache.json");
|
File file = new File(cacheDir, id + File.separator + "cache.json");
|
||||||
|
Files.createParentDirs(file);
|
||||||
|
Files.touch(file);
|
||||||
Files.write(gson.toJson(limboPlayer), file, Charsets.UTF_8);
|
Files.write(gson.toJson(limboPlayer), file, Charsets.UTF_8);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
ConsoleLogger.logException("Failed to write " + player.getName() + " cache.", e);
|
ConsoleLogger.logException("Failed to write " + player.getName() + " cache.", e);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user