From 74249e2ee71bdc4a02aa1f0d484f12d48686311a Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 20 Jan 2014 13:50:32 +1100 Subject: [PATCH] Reduce memory of hiddenPlayers map. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 2c129ac..1d6d1ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -66,7 +66,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { private boolean hasPlayedBefore = false; private final ConversationTracker conversationTracker = new ConversationTracker(); private final Set channels = new HashSet(); - private final Set hiddenPlayers = new HashSet(); + private final Map hiddenPlayers = new MapMaker().weakValues().makeMap(); // Spigot - soft -> weak private int hash = 0; private double health = 20; private boolean scaledHealth = false; -- 1.8.3.2