@@ -0,0 +1,2020 @@
+package com.btk5h.skriptmirror.skript;%0A%0Aimport ch.njol.skript.Skript;%0Aimport ch.njol.skript.lang.Effect;%0Aimport ch.njol.skript.lang.Expression;%0Aimport ch.njol.skript.lang.SkriptParser;%0Aimport ch.njol.skript.lang.TriggerItem;%0Aimport ch.njol.util.Kleenean;%0Aimport com.btk5h.skriptmirror.SkriptMirror;%0Aimport com.btk5h.skriptmirror.skript.reflect.ExprJavaCall;%0Aimport com.btk5h.skriptmirror.skript.reflect.ExprTry;%0Aimport com.btk5h.skriptmirror.util.SkriptUtil;%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.event.Event;%0A%0Aimport java.util.concurrent.CompletableFuture;%0Aimport java.util.concurrent.ExecutorService;%0Aimport java.util.concurrent.Executors;%0A%0Apublic class EffExpressionStatement extends Effect %7B%0A  static %7B%0A    Skript.registerEffect(EffExpressionStatement.class, %22%5B(1%C2%A6await)%5D %25~javaobject%25%22);%0A  %7D%0A%0A  private static final ExecutorService threadPool =%0A      Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());%0A%0A  private Expression%3CObject%3E arg;%0A  private boolean isAsynchronous;%0A%0A  @Override%0A  protected void execute(Event e) %7B%0A    arg.getAll(e);%0A  %7D%0A%0A  @Override%0A  protected TriggerItem walk(Event e) %7B%0A    if (isAsynchronous) %7B%0A      CompletableFuture.runAsync(() -%3E execute(e), threadPool)%0A          .thenAccept(res -%3E Bukkit.getScheduler().runTask(SkriptMirror.getInstance(), () -%3E %7B%0A            if (getNext() != null) %7B%0A              TriggerItem.walk(getNext(), e);%0A            %7D%0A          %7D));%0A      return null;%0A    %7D%0A    return super.walk(e);%0A  %7D%0A%0A  @Override%0A  public String toString(Event e, boolean debug) %7B%0A    return arg.toString(e, debug);%0A  %7D%0A%0A  @SuppressWarnings(%22unchecked%22)%0A  @Override%0A  public boolean init(Expression%3C?%3E%5B%5D exprs, int matchedPattern, Kleenean isDelayed,%0A                      SkriptParser.ParseResult parseResult) %7B%0A    arg = SkriptUtil.defendExpression(exprs%5B0%5D);%0A%0A    if (!(arg instanceof ExprJavaCall %7C%7C arg instanceof ExprTry)) %7B%0A      return false;%0A    %7D%0A%0A    isAsynchronous = (parseResult.mark & 1) == 1;%0A    return SkriptUtil.canInitSafely(arg);%0A  %7D%0A%7D%0A

Add expression statement effect for effect commands