diff --git a/src/main/java/emu/grasscutter/server/game/GameServerPacketHandler.java b/src/main/java/emu/grasscutter/server/game/GameServerPacketHandler.java index 89fa71481..dbead5240 100644 --- a/src/main/java/emu/grasscutter/server/game/GameServerPacketHandler.java +++ b/src/main/java/emu/grasscutter/server/game/GameServerPacketHandler.java @@ -22,7 +22,11 @@ public class GameServerPacketHandler { this.registerHandlers(handlerClass); } - + + public void registerPacketHandler(int opcode, PacketHandler handler) { + this.handlers.put(opcode, handler); + } + public void registerHandlers(Class handlerClass) { Reflections reflections = new Reflections("emu.grasscutter.server.packet"); Set handlerClasses = reflections.getSubTypesOf(handlerClass);