1
0
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:
Tim203
2020-01-26 10:16:33 +01:00
parent 242004df5c
commit 580ae0dcf0
6 changed files with 31 additions and 16 deletions

View File

@@ -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);