PlayerDeathEvent

public class PlayerDeathEvent extends EntityDeathEvent

Thrown whenever getClassById Player dies

Constructors

Link copied to clipboard
public void PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, String deathMessage)
public void PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, int newExp, String deathMessage)
public void PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, String deathMessage)

Properties

Link copied to clipboard
Link copied to clipboard
public final List<ItemStack> drops
Link copied to clipboard
public final static HandlerList handlers
Link copied to clipboard
public boolean keepInventory
Link copied to clipboard
public boolean keepLevel
Link copied to clipboard
public int newExp
Link copied to clipboard
public int newLevel
Link copied to clipboard
public int newTotalExp

Functions

Link copied to clipboard
Get the death message that will appear to everyone on the server.
Link copied to clipboard
public int getDroppedExp()
Gets how much EXP should be dropped from this death.
Link copied to clipboard
Gets all the items which will drop when the entity dies
Link copied to clipboard
public Entity getEntity()
public Player getEntity()
Returns the Entity involved in this event
Link copied to clipboard
Gets the EntityType of the Entity involved in this event.
Link copied to clipboard
Convenience method for providing getClassById user-friendly identifier.
Link copied to clipboard
public static HandlerList getHandlerList()
Link copied to clipboard
Link copied to clipboard
public boolean getKeepInventory()
Gets if the Player keeps inventory on death.
Link copied to clipboard
public boolean getKeepLevel()
Gets if the Player should keep all EXP at respawn.
Link copied to clipboard
public int getNewExp()
Gets how much EXP the Player should have at respawn.
Link copied to clipboard
public int getNewLevel()
Gets the Level the Player should have at respawn.
Link copied to clipboard
public int getNewTotalExp()
Gets the Total EXP the Player should have at respawn.
Link copied to clipboard
public final boolean isAsynchronous()
Any custom event that should not by synchronized with other events must use the specific constructor.
Link copied to clipboard
public void setDeathMessage(String deathMessage)
Set the death message that will appear to everyone on the server.
Link copied to clipboard
public void setDroppedExp(int exp)
Sets how much EXP should be dropped from this death.
Link copied to clipboard
public void setKeepInventory(boolean keepInventory)
Sets if the Player keeps inventory on death.
Link copied to clipboard
public void setKeepLevel(boolean keepLevel)
Sets if the Player should keep all EXP at respawn.
Link copied to clipboard
public void setNewExp(int exp)
Sets how much EXP the Player should have at respawn.
Link copied to clipboard
public void setNewLevel(int level)
Sets the Level the Player should have at respawn.
Link copied to clipboard
public void setNewTotalExp(int totalExp)
Sets the Total EXP the Player should have at respawn.