mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 08:43:30 +00:00
Fix event invokes
This commit is contained in:
parent
4c0ce8e20e
commit
1de1f42abc
@ -295,8 +295,10 @@ public final class PluginManager {
|
||||
* @param event The event to invoke.
|
||||
*/
|
||||
public void invokeEvent(Event event) {
|
||||
this.handlers.get(event.getClass())
|
||||
.forEach(handler -> this.invokeHandler(event, handler));
|
||||
var handlers = this.handlers.get(event.getClass());
|
||||
if (handlers == null) return;
|
||||
|
||||
handlers.forEach(handler -> this.invokeHandler(event, handler));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user