mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +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)
|
if (predicate == null)
|
||||||
return true;
|
return true;
|
||||||
final var value = filter.getHandler(event);
|
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