Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
dde5a609
Commit
dde5a609
authored
May 01, 2022
by
coooookies
Committed by
Melledy
May 01, 2022
Browse files
GameServerPacketHandler need to be added a registration interface for plugin developers
parent
677aa2d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/game/GameServerPacketHandler.java
View file @
dde5a609
...
...
@@ -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
<?
extends
PacketHandler
>
handlerClass
)
{
Reflections
reflections
=
new
Reflections
(
"emu.grasscutter.server.packet"
);
Set
<?>
handlerClasses
=
reflections
.
getSubTypesOf
(
handlerClass
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment