Add try-catch for EventNode condition

This commit is contained in:
TheMode 2021-06-14 14:42:10 +02:00
parent f2bf27c86e
commit 6315bd5c61

View File

@ -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;
}
}
/**