@@ -0,0 +1,963 @@
+package net.engin33r.luaspigot.lua;%0A%0Aimport net.engin33r.luaspigot.lua.type.LuaEvent;%0Aimport org.luaj.vm2.LuaValue;%0Aimport org.luaj.vm2.Varargs;%0A%0Aimport java.util.Arrays;%0A%0Aimport static org.luaj.vm2.LuaValue.NIL;%0A%0A/**%0A * Utility class for creating Varargs from arrays.%0A */%0Apublic class VarargBuilder %7B%0A    public static Varargs build(LuaValue... values) %7B%0A        return new Varargs() %7B%0A            @Override%0A            public LuaValue arg(int i) %7B%0A                return values.length %3C i ? NIL : values%5Bi-1%5D;%0A            %7D%0A%0A            @Override%0A            public int narg() %7B%0A                return values.length;%0A            %7D%0A%0A            @Override%0A            public LuaValue arg1() %7B%0A                return arg(0);%0A            %7D%0A%0A            @Override%0A            public Varargs subargs(int start) %7B%0A                return VarargBuilder.build(Arrays%0A                        .copyOfRange(values, start, values.length-1));%0A            %7D%0A        %7D;%0A    %7D%0A%7D%0A

Add utility class for creating Varargs values