Skip to content

Commit

Permalink
Use an identity map for Paper chat listener (EssentialsX#6067)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy authored Feb 23, 2025
1 parent f5efa26 commit 1ff24cb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;

import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Map;

public abstract class PaperChatListenerProvider implements Listener {
private final LegacyComponentSerializer serializer;
private final HashMap<AsyncChatEvent, PaperChatEvent> eventMap = new HashMap<>();
private final Map<AsyncChatEvent, PaperChatEvent> eventMap = new IdentityHashMap<>();

public PaperChatListenerProvider() {
this.serializer = LegacyComponentSerializer.builder()
Expand Down

0 comments on commit 1ff24cb

Please sign in to comment.