@@ -0,0 +1,592 @@
+package net.engin33r.luaspigot.lua;%0A%0Aimport org.luaj.vm2.LuaTable;%0Aimport org.luaj.vm2.LuaValue;%0A%0A/**%0A * Utility class for validating arguments against %7B@link WeakType%7D types.%0A */%0Apublic class TypeValidator %7B%0A    public static void validate(LuaTable val, String type) %7B%0A        LuaValue ttype = val.get(%22type%22);%0A        if (ttype == LuaValue.NIL) %7B%0A            LuaValue.error(type + %22 expected, got table%22);%0A        %7D else %7B%0A            String vtype = ttype.tojstring();%0A            if (!vtype.equals(type))%0A                LuaValue.error(type + %22 expected, got %22 + vtype);%0A        %7D%0A    %7D%0A%7D%0A

Add utility class for validating tables against WeakTypes