public static interface HarvestEntityEvent.TargetPlayer extends HarvestEntityEvent.TargetHumanoid, TargetPlayerEvent
Player
. Usually this will
have additional information regarding whether the player
keepsInventory()
and their current experience.HarvestEntityEvent.TargetHumanoid, HarvestEntityEvent.TargetLiving, HarvestEntityEvent.TargetPlayer
Modifier and Type | Method and Description |
---|---|
int |
getLevel()
Gets the new level the player will have after death.
|
boolean |
keepsInventory()
Gets whether the player keeps their inventory on death.
|
boolean |
keepsLevel()
Gets whether the player keeps all of their EXP on death.
|
void |
setKeepsInventory(boolean keepInventory)
Sets if the player keeps their inventory on death.
|
void |
setKeepsLevel(boolean keepLevel)
Sets if the player keeps all of their EXP on death.
|
void |
setLevel(int level)
Sets the new level the player will have after death.
|
createChangeEntityExperienceEvent, getExperience, getFinalData, getOriginalData, getOriginalExperience, setExperience
getTargetEntity
getCause, getContext, getSource
isCancelled, setCancelled
getTargetEntity
boolean keepsInventory()
void setKeepsInventory(boolean keepInventory)
keepInventory
- Whether the player should keep inventoryboolean keepsLevel()
void setKeepsLevel(boolean keepLevel)
keepLevel
- Whether the player will keep experience on deathint getLevel()
void setLevel(int level)
level
- The new level after death