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
5a8b76d9
Commit
5a8b76d9
authored
Jun 22, 2022
by
KingRainbow44
Browse files
Update `EventHandler` with new register syntax
parent
6175e957
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/server/event/EventHandler.java
View file @
5a8b76d9
package
emu.grasscutter.server.event
;
package
emu.grasscutter.server.event
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.Grasscutter
;
import
emu.grasscutter.plugin.Plugin
;
import
emu.grasscutter.utils.EventConsumer
;
import
emu.grasscutter.utils.EventConsumer
;
public
final
class
EventHandler
<
T
extends
Event
>
{
public
final
class
EventHandler
<
T
extends
Event
>
{
...
@@ -75,7 +76,7 @@ public final class EventHandler<T extends Event> {
...
@@ -75,7 +76,7 @@ public final class EventHandler<T extends Event> {
/**
/**
* Registers the handler into the PluginManager.
* Registers the handler into the PluginManager.
*/
*/
public
void
register
()
{
public
void
register
(
Plugin
plugin
)
{
Grasscutter
.
getPluginManager
().
registerListener
(
this
);
Grasscutter
.
getPluginManager
().
registerListener
(
plugin
,
this
);
}
}
}
}
\ No newline at end of file
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