Skip to content

Commit

Permalink
NBTApi - changes
Browse files Browse the repository at this point in the history
- If TAG is not present in NBT, return null
- Ref #32
  • Loading branch information
ShaneBeee committed Jul 7, 2020
1 parent 4acb766 commit 23fc143
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/tk/shanebee/bee/api/NBTApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 23fc143

Please sign in to comment.