custom events, and low level event API

This commit is contained in:
gnembon committed 2020-11-11 02:06:45 -04:00
1 parent 0e1a152510
commit 55643632ca
15 files changed
+466 -99

No files matched your search

@@ -131,6 +131,10 @@ public class EntityValue extends Value
player = (ServerPlayerEntity) e;
}
}
else if (value.isNull())
{
return null;
}
else
{
String playerName = value.getString();
@@ -20,7 +20,7 @@ public class ThreadValue extends Value
private final long id;
private static long sequence = 0L;
public ThreadValue(Value pool, FunctionValue function, Expression expr, Tokenizer.Token token, Context ctx, List<LazyValue> args)
public ThreadValue(Value pool, FunctionValue function, Expression expr, Tokenizer.Token token, Context ctx, List<Value> args)
{
id = sequence++;
ExecutorService executor = ctx.host.getExecutor(pool);
@@ -36,7 +36,7 @@ public class ThreadValue extends Value
{
try
{
return function.lazyEval(ctx, Context.NONE, expr, token, args).evalValue(ctx);
return function.lazyEval(ctx, Context.NONE, expr, token, FunctionValue.lazify(args)).evalValue(ctx);
}
catch (ExitStatement exit)
{