Cap skin packet tracker max entries

This commit is contained in:
fullwall 2022-03-13 18:19:32 +08:00
parent 9acf264db3
commit 3a5e43b779

View File

@ -29,7 +29,8 @@ import net.citizensnpcs.util.NMS;
*/
public class SkinPacketTracker {
private final SkinnableEntity entity;
private final Map<UUID, PlayerEntry> inProgress = new HashMap<UUID, PlayerEntry>(Bukkit.getMaxPlayers() / 2);
private final Map<UUID, PlayerEntry> inProgress = new HashMap<UUID, PlayerEntry>(
Math.min(1000, Bukkit.getMaxPlayers() / 2));
private boolean isRemoved;
private Skin skin;