Fixed NPE
This commit is contained in:
parent
dded17bf70
commit
1c2b373bd7
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ public class TBMCPlayer implements AutoCloseable {
|
|||
if (!mname.startsWith("get"))
|
||||
throw new UnsupportedOperationException("Can only use getData from a getXYZ method");
|
||||
Object ret = getLoadedPlayers().get(uuid).data.get(mname.substring("get".length()).toLowerCase());
|
||||
if (Integer.class.isAssignableFrom(ret.getClass()))
|
||||
if (ret != null && Integer.class.isAssignableFrom(ret.getClass()))
|
||||
throw new UnsupportedOperationException("For integers use getIntData()");
|
||||
return (T) ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue