mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-06 10:49:40 +01:00
23 lines
1.1 KiB
Diff
23 lines
1.1 KiB
Diff
From 5f890235c56ef21d940855867f18fb2e4e8ea75c Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
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 0e8fedf..a717d34 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
|
@@ -63,7 +63,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|
private boolean hasPlayedBefore = false;
|
|
private final ConversationTracker conversationTracker = new ConversationTracker();
|
|
private final Set<String> channels = new HashSet<String>();
|
|
- private final Map<String, Player> hiddenPlayers = new MapMaker().softValues().makeMap();
|
|
+ private final Map<String, Player> hiddenPlayers = new MapMaker().weakValues().makeMap(); // Spigot - soft -> weak
|
|
private int hash = 0;
|
|
private double health = 20;
|
|
private boolean scaledHealth = false;
|
|
--
|
|
1.8.3.2
|
|
|