Add SQL Generators

Add cache for table strings generated
Add legacy support for Tags and login messages by converting legacy color codes to minimessage tags
This commit is contained in:
Taah
2023-08-26 06:59:29 -07:00
parent 1f48dc1e60
commit b0a8b463cb
20 changed files with 384 additions and 26 deletions
@@ -2,9 +2,13 @@ package dev.plex.util;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.ClassPath;
import com.google.common.reflect.TypeToken;
import dev.plex.Plex;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
@@ -54,4 +58,14 @@ public class ReflectionsUtil
});
return Collections.unmodifiableSet(classes);
}
public static Class<?> getGenericField(Field field)
{
Type type = field.getGenericType();
if (type instanceof ParameterizedType parameterizedType)
{
return TypeToken.of(parameterizedType.getActualTypeArguments()[0]).getRawType();
}
return field.getType();
}
}