ExperienceOrb merging/stacking API

Adds ExperienceOrbMergeEvent
Fired when the server is about to merge 2 experience orbs
Plugins can cancel this if they want to ensure experience orbs do not lose important
metadata such as spawn reason, or conditionally move data from source to target.

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
This commit is contained in:
Aikar
2017-12-19 22:56:24 -05:00
parent bef438ad25
commit bb15855d47
2 changed files with 104 additions and 0 deletions

View File

@@ -21,6 +21,22 @@ public interface ExperienceOrb extends Entity {
* @param value Amount of experience
*/
public void setExperience(int value);
// Paper start - expose count
/**
* Get the stacked count for this experience orb.
*
* @return the count
*/
int getCount();
/**
* Sets the stacked count for this experience orb.
*
* @param count the new count
*/
void setCount(int count);
// Paper end
// Paper start
/**