mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-15 16:34:56 +01:00
Fix event invokes
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user