mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2026-01-06 15:42:03 +00:00
Some fixes for the Bungee and Bukkit version
This commit is contained in:
@@ -61,6 +61,10 @@ public class ReflectionUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static Object getValue(Object instance, String fieldName) {
|
||||
return getValue(instance, getField(instance.getClass(), fieldName));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T getCastedValue(Object instance, Field field, Class<T> returnType) {
|
||||
return (T) getValue(instance, field);
|
||||
|
||||
Reference in New Issue
Block a user