Merge branch 'master' of https://github.com/TBMCPlugins/ButtonCore.git
Conflicts: src/main/java/buttondevteam/lib/DebugPotatoAPI.java
This commit is contained in:
commit
9b645bce07
1 changed files with 2 additions and 0 deletions
|
@ -157,6 +157,8 @@ public class TBMCPlayer implements AutoCloseable {
|
||||||
if (!mname.startsWith("get"))
|
if (!mname.startsWith("get"))
|
||||||
throw new UnsupportedOperationException("Can only use getIntData from a getXYZ method");
|
throw new UnsupportedOperationException("Can only use getIntData from a getXYZ method");
|
||||||
Object obj = getLoadedPlayers().get(uuid).data.get(mname.substring("get".length()).toLowerCase());
|
Object obj = getLoadedPlayers().get(uuid).data.get(mname.substring("get".length()).toLowerCase());
|
||||||
|
if (obj == null)
|
||||||
|
return null;
|
||||||
if (obj instanceof Short)
|
if (obj instanceof Short)
|
||||||
return (T) obj;
|
return (T) obj;
|
||||||
if (!(Integer.class.isAssignableFrom(obj.getClass())))
|
if (!(Integer.class.isAssignableFrom(obj.getClass())))
|
||||||
|
|
Loading…
Reference in a new issue