Hopefully fixing #40
This commit is contained in:
parent
1e937b423c
commit
fbdb43684f
|
@ -83,8 +83,13 @@ public class PlayerCache {
|
||||||
logInfo("Creating cache for " + Objects.requireNonNull(player).getGameProfile().getName());
|
logInfo("Creating cache for " + Objects.requireNonNull(player).getGameProfile().getName());
|
||||||
|
|
||||||
String json = DB.getUserData(fakeUuid);
|
String json = DB.getUserData(fakeUuid);
|
||||||
// Parsing data from DB
|
PlayerCache playerCache;
|
||||||
PlayerCache playerCache = gson.fromJson(json, PlayerCache.class);
|
if(!json.isEmpty()) {
|
||||||
|
// Parsing data from DB
|
||||||
|
playerCache = gson.fromJson(json, PlayerCache.class);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
playerCache = new PlayerCache();
|
||||||
if(player != null) {
|
if(player != null) {
|
||||||
// Setting position cache
|
// Setting position cache
|
||||||
playerCache.lastLocation.dimension = player.getServerWorld();
|
playerCache.lastLocation.dimension = player.getServerWorld();
|
||||||
|
|
Loading…
Reference in New Issue