Save existing vehicles if we had to load player (#22)

This commit is contained in:
Jikoo
2020-04-19 17:52:44 -04:00
parent 7210f9153e
commit a1b2df74cc
6 changed files with 269 additions and 6 deletions

View File

@@ -465,6 +465,9 @@ public class OpenInv extends JavaPlugin implements IOpenInv {
return;
}
// Replace stored player with our own version
this.playerCache.put(key, this.accessor.getPlayerDataManager().inject(player));
if (this.inventories.containsKey(key)) {
this.inventories.get(key).setPlayerOffline();
}