mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-28 13:45:14 +01:00
Might a fix a NPE when loading Players from Flatfile database
This commit is contained in:
parent
884df8f07d
commit
433efcf6c0
@ -55,15 +55,14 @@ public class BSBDatabase<T> {
|
||||
* @return the object or null if it cannot be loaded
|
||||
*/
|
||||
public T loadObject(String uniqueId) {
|
||||
|
||||
T result = null;
|
||||
try {
|
||||
return handler.loadObject(uniqueId);
|
||||
result = handler.loadObject(uniqueId);
|
||||
} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException
|
||||
| ClassNotFoundException | IntrospectionException e) {
|
||||
logger.severe(() -> "Could not load object from database! " + e.getMessage());
|
||||
}
|
||||
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user