Paper
Paper copied to clipboard
Implement Better Player Experience API
This adds a more useful API to get the total amount of experience the player currently has. This fixes #6253
Background
The current experience API allows to get the player's exp levels, percent to the next exp level, and total, lifetime experience. Some plugins need to be able to access the total number of experience points a player has at a given time. This adds Player#getCurrentExperience which does just that.
Should it not return long instead?
Yep, it should! I'll go fix that (I verified this by giving myself 3000000 xp points in game to ensure it handles it properly, which it does, therefore it should be a long)
Does it make sense to have a setter as well?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Bump. Any update on this?
Bump. Any update on this?
I mean, they did ask about a setter. I think this is a good idea to have. So that is the next step really.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in a long time. If the issue still applies to the most recent supported version, please open a new issue referencing this original issue.