Open p1gyy opened 1 year ago
i am trying to get the LevelName from a level.dat file but whenever I try to do that it always returns null
CompoundTag namedTag = (CompoundTag)NBTUtil.read(levelDat).getTag(); this.WORLD_NAME = namedTag.getStringTag("LevelName").getValue(); LOGGER.info(WORLD_NAME);
Caused by: java.lang.NullPointerException: Cannot invoke "net.querz.nbt.tag.StringTag.getValue()" because the return value of "net.querz.nbt.tag.CompoundTag.getStringTag(String)" is null
i am trying to get the LevelName from a level.dat file but whenever I try to do that it always returns null
Caused by: java.lang.NullPointerException: Cannot invoke "net.querz.nbt.tag.StringTag.getValue()" because the return value of "net.querz.nbt.tag.CompoundTag.getStringTag(String)" is null