events handling is disabled now when potentially triggered from the scarpet script preventing from recursive callbacks.
This commit is contained in:
1 parent
8325783bf4
commit
229d0b037b
5 files changed
+104
-32
No files matched your search
@@ -72,7 +72,7 @@ public class CarpetExpression
|
||||
Value playerValue = new EntityValue(e).bindTo("p");
|
||||
context.with("p", (cc, tt) -> playerValue);
|
||||
}
|
||||
return this.expr.eval(context).getBoolean();
|
||||
return CarpetServer.scriptServer.events.handleEvents.getWhileDisabled(()-> this.expr.eval(context).getBoolean());
|
||||
}
|
||||
catch (ExpressionException e)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ public class CarpetExpression
|
||||
Value playerValue = new EntityValue(e).bindTo("p");
|
||||
context.with("p", (cc, tt) -> playerValue);
|
||||
}
|
||||
return this.expr.eval(context);
|
||||
return CarpetServer.scriptServer.events.handleEvents.getWhileDisabled(()-> this.expr.eval(context));
|
||||
}
|
||||
catch (ExpressionException e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user