Store UUID instead of name for faster re-open lookups

This commit is contained in:
Jikoo 2019-04-28 11:03:00 -04:00
parent c5c1f47167
commit a469c732cc
2 changed files with 4 additions and 4 deletions

View file

@ -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) {

View file

@ -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) {