13
0
geforkt von Mirrors/Paper
Paper/CraftBukkit-Patches/0092-Reduce-memory-of-hiddenPlayers-map.patch

23 Zeilen
1.1 KiB
Diff

2014-03-26 21:34:47 +01:00
From e2defad641150ed835c851d1db39ecc18cb95978 Mon Sep 17 00:00:00 2001
2014-01-20 03:50:37 +01:00
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
2014-03-26 21:34:47 +01:00
index 3fcab5d..7a96a3f 100644
2014-01-20 03:50:37 +01:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
2014-02-12 14:48:26 +01:00
@@ -63,7 +63,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
2014-01-20 03:50:37 +01:00
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;
--
2014-03-26 21:34:47 +01:00
1.8.5.2.msysgit.0
2014-01-20 03:50:37 +01:00