diff --git a/src/main/java/tk/shanebee/bee/api/NBTApi.java b/src/main/java/tk/shanebee/bee/api/NBTApi.java index 8a3f0d67c..f70f40c28 100644 --- a/src/main/java/tk/shanebee/bee/api/NBTApi.java +++ b/src/main/java/tk/shanebee/bee/api/NBTApi.java @@ -203,7 +203,7 @@ public Object getTag(String tag, String nbt) { if (nbt == null) return null; NBTCompound compound = new NBTContainer(nbt); NBTType type = compound.getType(tag); - switch (compound.getType(tag)) { + switch (type) { case NBTTagString: return compound.getString(tag); case NBTTagInt: @@ -217,7 +217,8 @@ public Object getTag(String tag, String nbt) { case NBTTagDouble: return compound.getDouble(tag); case NBTTagEnd: - return compound.toString(); + //return compound.toString(); // let's leave this here just in case + return null; case NBTTagLong: return compound.getLong(tag); case NBTTagByte: