forked from sorceress/EasyAuth
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());
|
||||
|
||||
String json = DB.getUserData(fakeUuid);
|
||||
PlayerCache playerCache;
|
||||
if(!json.isEmpty()) {
|
||||
// Parsing data from DB
|
||||
PlayerCache playerCache = gson.fromJson(json, PlayerCache.class);
|
||||
playerCache = gson.fromJson(json, PlayerCache.class);
|
||||
}
|
||||
else
|
||||
playerCache = new PlayerCache();
|
||||
if(player != null) {
|
||||
// Setting position cache
|
||||
playerCache.lastLocation.dimension = player.getServerWorld();
|
||||
|
|
Loading…
Reference in New Issue