From ef637086756002966be21ac12b0cafac55d6d3d0 Mon Sep 17 00:00:00 2001 From: Benjamin Elsdon Date: Tue, 17 May 2022 19:16:44 +0800 Subject: [PATCH] Change BANNED_PACKETS to HashSet instaed of List --- src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java b/src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java index 685f054f6..a4c5905b1 100644 --- a/src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java +++ b/src/main/java/emu/grasscutter/net/packet/PacketOpcodes.java @@ -1,6 +1,7 @@ package emu.grasscutter.net.packet; import java.util.Arrays; +import java.util.HashSet; import java.util.List; public class PacketOpcodes { @@ -1556,5 +1557,8 @@ public class PacketOpcodes { public static final int UNKNOWN_44 = 8983; public static final int UNKNOWN_45 = 943; - public static final List BANNED_PACKETS = Arrays.asList(PacketOpcodes.WindSeedClientNotify, PacketOpcodes.PlayerLuaShellNotify); + public static final HashSet BANNED_PACKETS = new HashSet() {{ + add(PacketOpcodes.WindSeedClientNotify); + add(PacketOpcodes.PlayerLuaShellNotify); + }}; }