Fixed small but impactful error

https://github.com/TBMCPlugins/DiscordPlugin/issues/19
This commit is contained in:
Norbi Peti 2016-12-08 23:41:12 +01:00 committed by GitHub
parent 9661cd3405
commit 62f783e695

View file

@ -159,7 +159,7 @@ public class TBMCPlayer implements AutoCloseable {
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) if (obj == null)
return null; return Optional.empty();
if (obj instanceof Short) if (obj instanceof Short)
return Optional.of((T) obj); return Optional.of((T) obj);
if (!(Integer.class.isAssignableFrom(obj.getClass()))) if (!(Integer.class.isAssignableFrom(obj.getClass())))