From a469c732cc89c349f3cf97a0f8821ad7a65313c9 Mon Sep 17 00:00:00 2001 From: Jikoo Date: Sun, 28 Apr 2019 11:03:00 -0400 Subject: [PATCH] Store UUID instead of name for faster re-open lookups --- .../com/lishid/openinv/commands/OpenEnderPluginCommand.java | 4 ++-- .../com/lishid/openinv/commands/OpenInvPluginCommand.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenEnderPluginCommand.java b/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenEnderPluginCommand.java index 4239555..cfc8672 100644 --- a/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenEnderPluginCommand.java +++ b/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenEnderPluginCommand.java @@ -131,10 +131,10 @@ public class OpenEnderPluginCommand implements CommandExecutor { } // Record the target - this.openEnderHistory.put(player, onlineTarget.getName()); + this.openEnderHistory.put(player, this.plugin.getPlayerID(target)); // Create the inventory - ISpecialEnderChest chest; + final ISpecialEnderChest chest; try { chest = this.plugin.getSpecialEnderChest(onlineTarget, online); } catch (Exception e) { diff --git a/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenInvPluginCommand.java b/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenInvPluginCommand.java index ab62861..69d7e46 100644 --- a/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenInvPluginCommand.java +++ b/plugin/plugin-core/src/main/java/com/lishid/openinv/commands/OpenInvPluginCommand.java @@ -140,10 +140,10 @@ public class OpenInvPluginCommand implements CommandExecutor { } // Record the target - this.openInvHistory.put(player, onlineTarget.getName()); + this.openInvHistory.put(player, this.plugin.getPlayerID(target)); // Create the inventory - ISpecialPlayerInventory inv; + final ISpecialPlayerInventory inv; try { inv = this.plugin.getSpecialInventory(onlineTarget, online); } catch (Exception e) {