mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 00:44:46 +01:00
Fix event invokes
This commit is contained in:
@@ -295,8 +295,10 @@ public final class PluginManager {
|
|||||||
* @param event The event to invoke.
|
* @param event The event to invoke.
|
||||||
*/
|
*/
|
||||||
public void invokeEvent(Event event) {
|
public void invokeEvent(Event event) {
|
||||||
this.handlers.get(event.getClass())
|
var handlers = this.handlers.get(event.getClass());
|
||||||
.forEach(handler -> this.invokeHandler(event, handler));
|
if (handlers == null) return;
|
||||||
|
|
||||||
|
handlers.forEach(handler -> this.invokeHandler(event, handler));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user