We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to get player's position from .dat file inside playerdata folder
public double[] getPosition(CompoundTag tag){ double result[] = new double[3]; ListTag list = tag.getListTag("Pos"); for(int i=0;i<list.size();i++){ result[result.length-1] = Double.parseDouble(list.get(i).valueToString()); } return result; }
CompoundTag tag = nbt.parseFile(utils.baseDir+"/world/playerdata/<UUID>"); double[] pos = nbt.getPosition(tag); // <--- this for(int i=0;i<pos.length;i++){ plugin.getLogger().info(String.valueOf(pos[i])); }
This function returns {0,0,0} but when I check the file with NBTEditor the values are correct with the actual position
The text was updated successfully, but these errors were encountered:
I fixed it by using .replace("I;",""); but I'm pretty sure it's a bug
.replace("I;","");
Sorry, something went wrong.
No branches or pull requests
I'm trying to get player's position from .dat file inside playerdata folder
This function returns {0,0,0} but when I check the file with NBTEditor the values are correct with the actual position
The text was updated successfully, but these errors were encountered: