Cap skinupdatetracker map size

This commit is contained in:
fullwall 2021-08-20 21:22:46 +08:00
parent 732716215e
commit 14a6004adf

View File

@ -38,7 +38,7 @@ import net.citizensnpcs.util.Util;
public class SkinUpdateTracker {
private final Map<SkinnableEntity, Void> navigating = new WeakHashMap<SkinnableEntity, Void>(25);
private final Map<UUID, PlayerTracker> playerTrackers = new HashMap<UUID, PlayerTracker>(
Math.max(128, Bukkit.getMaxPlayers() / 2));
Math.max(128, Math.min(1024, Bukkit.getMaxPlayers() / 2)));
private final Map<String, NPCRegistry> registries;
private final NPCNavigationUpdater updater = new NPCNavigationUpdater();