From 15b3a5a4bd3f81a1996bad49ef8216a0f5adf59d Mon Sep 17 00:00:00 2001 From: Shevchik Date: Fri, 7 Mar 2014 20:19:11 +0400 Subject: [PATCH] Do not use backreference, it's just a waste of mem for too small cpu saving --- src/com/cnaude/chairs/core/PlayerSitData.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/com/cnaude/chairs/core/PlayerSitData.java b/src/com/cnaude/chairs/core/PlayerSitData.java index ea57006..2189b12 100644 --- a/src/com/cnaude/chairs/core/PlayerSitData.java +++ b/src/com/cnaude/chairs/core/PlayerSitData.java @@ -17,7 +17,6 @@ public class PlayerSitData { private HashMap sit = new HashMap(); private HashMap sitblock = new HashMap(); - private HashMap sitblockbr = new HashMap(); private HashMap sitstopteleportloc = new HashMap(); private HashMap sittask = new HashMap(); @@ -46,7 +45,6 @@ public class PlayerSitData { arrow.setPassenger(player); sit.put(player.getName(), arrow); sitblock.put(block, player.getName()); - sitblockbr.put(player.getName(), block); startReSitTask(player); } catch (Exception e) { e.printStackTrace(); @@ -125,8 +123,7 @@ public class PlayerSitData { } else if (correctleaveposition) { player.teleport(tploc); } - sitblock.remove(sitblockbr.get(player.getName())); - sitblockbr.remove(player.getName()); + sitblock.values().remove(player.getName()); sitstopteleportloc.remove(player.getName()); Bukkit.getScheduler().cancelTask(sittask.get(player.getName())); sittask.remove(player.getName());