- Add restore method in LimboCache

* Apply it to process that have use of it
- Fix fly & walk speed not get restored
This commit is contained in:
DNx5
2016-07-04 13:21:57 +07:00
parent deffcb3e2b
commit 140275f366
14 changed files with 98 additions and 115 deletions
@@ -115,11 +115,11 @@ public class AsynchronousJoin implements AsynchronousProcess {
return;
}
limboCache.updatePlayerData(player);
final boolean isAuthAvailable = database.isAuthAvailable(name);
if (isAuthAvailable) {
limboCache.addPlayerData(player);
service.setGroup(player, AuthGroupType.NOT_LOGGED_IN);
// Protect inventory
@@ -150,7 +150,9 @@ public class AsynchronousJoin implements AsynchronousProcess {
}
}
} else {
// Not Registered
// Not Registered. Delete old data, load default one.
limboCache.deletePlayerData(player);
limboCache.addPlayerData(player);
// Groups logic
service.setGroup(player, AuthGroupType.UNREGISTERED);