mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-16 20:31:30 +01:00
getField should return null on exception
This commit is contained in:
parent
156fbca6ce
commit
9fa1646ad6
@ -80,12 +80,13 @@ public class NMS {
|
||||
try {
|
||||
f = clazz.getDeclaredField(field);
|
||||
f.setAccessible(true);
|
||||
return f;
|
||||
} catch (Exception e) {
|
||||
if (log) {
|
||||
Messaging.logTr(Messages.ERROR_GETTING_FIELD, field, e.getLocalizedMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return f;
|
||||
}
|
||||
|
||||
public static MethodHandle getFinalSetter(Class<?> clazz, String field) {
|
||||
|
Loading…
Reference in New Issue
Block a user