mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Add try-catch for EventNode condition
This commit is contained in:
parent
f2bf27c86e
commit
6315bd5c61
@ -215,7 +215,12 @@ public class EventNode<T extends Event> {
|
||||
if (predicate == null)
|
||||
return true;
|
||||
final var value = filter.getHandler(event);
|
||||
return predicate.test(event, value);
|
||||
try {
|
||||
return predicate.test(event, value);
|
||||
} catch (Exception e) {
|
||||
MinecraftServer.getExceptionManager().handleException(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user