From 4811e53d127c8954cd753179356a06d4b7d981ae Mon Sep 17 00:00:00 2001 From: ShadowRanger Date: Tue, 12 Apr 2016 14:33:44 +1000 Subject: [PATCH] General refactoring --- src/main/java/com/lishid/openinv/OpenInv.java | 4 ++-- .../lishid/openinv/listeners/OpenInvPlayerListener.java | 9 ++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/lishid/openinv/OpenInv.java b/src/main/java/com/lishid/openinv/OpenInv.java index 162ac72..198faf0 100644 --- a/src/main/java/com/lishid/openinv/OpenInv.java +++ b/src/main/java/com/lishid/openinv/OpenInv.java @@ -48,12 +48,12 @@ public class OpenInv extends JavaPlugin { public static final Map inventories = new HashMap(); public static final Map enderChests = new HashMap(); + private Configuration configuration; + private PlayerDataManager playerLoader; private InventoryAccess inventoryAccess; private AnySilentChest anySilentChest; - private Configuration configuration; - @Override public void onEnable() { // Save the default config.yml if it doesn't already exist diff --git a/src/main/java/com/lishid/openinv/listeners/OpenInvPlayerListener.java b/src/main/java/com/lishid/openinv/listeners/OpenInvPlayerListener.java index 2eb3ff1..f3eca18 100644 --- a/src/main/java/com/lishid/openinv/listeners/OpenInvPlayerListener.java +++ b/src/main/java/com/lishid/openinv/listeners/OpenInvPlayerListener.java @@ -77,14 +77,9 @@ public class OpenInvPlayerListener implements Listener { }.runTaskLater(plugin, 1); } - final SpecialEnderChest enderChest = OpenInv.enderChests.get(player.getUniqueId()); + SpecialEnderChest enderChest = OpenInv.enderChests.get(player.getUniqueId()); if (enderChest != null) { - new BukkitRunnable() { - @Override - public void run() { - enderChest.playerOffline(); - } - }.runTaskLater(plugin, 1); + enderChest.playerOffline(); } }