From 62f783e695ac4b8cf37ed2cdf959f5e16dc13630 Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Thu, 8 Dec 2016 23:41:12 +0100 Subject: [PATCH] Fixed small but impactful error https://github.com/TBMCPlugins/DiscordPlugin/issues/19 --- src/main/java/buttondevteam/lib/TBMCPlayer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/buttondevteam/lib/TBMCPlayer.java b/src/main/java/buttondevteam/lib/TBMCPlayer.java index 639f53b..be2950b 100644 --- a/src/main/java/buttondevteam/lib/TBMCPlayer.java +++ b/src/main/java/buttondevteam/lib/TBMCPlayer.java @@ -159,7 +159,7 @@ public class TBMCPlayer implements AutoCloseable { throw new UnsupportedOperationException("Can only use getIntData from a getXYZ method"); Object obj = getLoadedPlayers().get(uuid).data.get(mname.substring("get".length()).toLowerCase()); if (obj == null) - return null; + return Optional.empty(); if (obj instanceof Short) return Optional.of((T) obj); if (!(Integer.class.isAssignableFrom(obj.getClass())))