Commit dde5a609 authored by coooookies's avatar coooookies Committed by Melledy
Browse files

GameServerPacketHandler need to be added a registration interface for plugin developers

parent 677aa2d2
......@@ -23,6 +23,10 @@ public class GameServerPacketHandler {
this.registerHandlers(handlerClass);
}
public void registerPacketHandler(int opcode, PacketHandler handler) {
this.handlers.put(opcode, handler);
}
public void registerHandlers(Class<? extends PacketHandler> handlerClass) {
Reflections reflections = new Reflections("emu.grasscutter.server.packet");
Set<?> handlerClasses = reflections.getSubTypesOf(handlerClass);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment