Stop using our own deprecated method on shutdown. Attempt to force close player's vault if they have it open while the server is shutting down. Should resolve #338

This commit is contained in:
Trent Hensler
2018-03-18 12:39:37 -07:00
parent 2788124bf9
commit 19b79b41a1
@@ -126,8 +126,10 @@ public class PlayerVaults extends JavaPlugin {
Inventory inventory = player.getOpenInventory().getTopInventory();
if (inventory.getViewers().size() == 1) {
VaultViewInfo info = this.inVault.get(player.getUniqueId().toString());
UUIDVaultManager.getInstance().saveVault(inventory, player.getUniqueId().toString(), info.getNumber());
VaultManager.getInstance().saveVault(inventory, player.getUniqueId(), info.getNumber());
this.openInventories.remove(info.toString());
// try this to make sure that they can't make further edits if the process hangs.
player.closeInventory();
}
this.inVault.remove(player.getUniqueId().toString());