You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
When trying to get the player's experience with player.get(Keys.TOTAL_EXPERIENCE).get() the value is always 0. Also player.get(ExperienceHolderData.class).get().totalExperience().get() is always 0.
I am currently running...
SpongeVanilla version: 1.11.2-6.0.0-BETA-253, 1.11.2-6.0.0-BETA-252 and 1.11.2-6.0.0-BETA-243
Java version: 1.8.0_121
Operating System:
Linux (Debian)
macOS
Windows
What is the expected result?
To recieve the amount of experience a player has.
I can't reproduce this. It works fine with 1.11.2-6.0.0-BETA-253. One thing I did notice is that experience given with /xp <levels>L [player] (so giving levels directly, not absolute experience) does not seem to count into TOTAL_EXPERIENCE but that seems to be just how the server counts it. (It tracks levels and total experience separately.)
When trying to get the player's experience with
player.get(Keys.TOTAL_EXPERIENCE).get()
the value is always 0. Alsoplayer.get(ExperienceHolderData.class).get().totalExperience().get()
is always 0.I am currently running...
What is the expected result?
To recieve the amount of experience a player has.
What is the current result?
Always 0.
Example plugin
https://gist.github.com/ryantheleach/0ab39f10e1879fd04b0b2c7c4018f25d
The text was updated successfully, but these errors were encountered: