Bukkit  1.7.9-R0.2-63-gcb87f4e
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.event.entity.PlayerDeathEvent Class Reference

Thrown whenever a Player dies. More...

+ Inheritance diagram for org.bukkit.event.entity.PlayerDeathEvent:
+ Collaboration diagram for org.bukkit.event.entity.PlayerDeathEvent:

Public Member Functions

 PlayerDeathEvent (final Player player, final List< ItemStack > drops, final int droppedExp, final String deathMessage)
 
 PlayerDeathEvent (final Player player, final List< ItemStack > drops, final int droppedExp, final int newExp, final String deathMessage)
 
 PlayerDeathEvent (final Player player, final List< ItemStack > drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final String deathMessage)
 
Player getEntity ()
 
void setDeathMessage (String deathMessage)
 Set the death message that will appear to everyone on the server.
 
String getDeathMessage ()
 Get the death message that will appear to everyone on the server.
 
int getNewExp ()
 Gets how much EXP the Player should have at respawn.
 
void setNewExp (int exp)
 Sets how much EXP the Player should have at respawn.
 
int getNewLevel ()
 Gets the Level the Player should have at respawn.
 
void setNewLevel (int level)
 Sets the Level the Player should have at respawn.
 
int getNewTotalExp ()
 Gets the Total EXP the Player should have at respawn.
 
void setNewTotalExp (int totalExp)
 Sets the Total EXP the Player should have at respawn.
 
boolean getKeepLevel ()
 Gets if the Player should keep all EXP at respawn.
 
void setKeepLevel (boolean keepLevel)
 Sets if the Player should keep all EXP at respawn.
 
void setKeepInventory (boolean keepInventory)
 Sets if the Player keeps inventory on death.
 
boolean getKeepInventory ()
 Gets if the Player keeps inventory on death.
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityDeathEvent
 EntityDeathEvent (final LivingEntity entity, final List< ItemStack > drops)
 
 EntityDeathEvent (final LivingEntity what, final List< ItemStack > drops, final int droppedExp)
 
LivingEntity getEntity ()
 
int getDroppedExp ()
 Gets how much EXP should be dropped from this death.
 
void setDroppedExp (int exp)
 Sets how much EXP should be dropped from this death.
 
List< ItemStackgetDrops ()
 Gets all the items which will drop when the entity dies.
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityEvent
 EntityEvent (final Entity what)
 
Entity getEntity ()
 Returns the Entity involved in this event.
 
EntityType getEntityType ()
 Gets the EntityType of the Entity involved in this event.
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 The default constructor is defined for cleaner code.
 
 Event (boolean isAsync)
 This constructor is used to explicitly declare an event as synchronous or asynchronous.
 
String getEventName ()
 Convenience method for providing a user-friendly identifier.
 
final boolean isAsynchronous ()
 Any custom event that should not by synchronized with other events must use the specific constructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from org.bukkit.event.entity.EntityDeathEvent
static HandlerList getHandlerList ()
 
- Protected Attributes inherited from org.bukkit.event.entity.EntityEvent
Entity entity
 

Detailed Description

Thrown whenever a Player dies.

Definition at line 11 of file PlayerDeathEvent.java.

Constructor & Destructor Documentation

org.bukkit.event.entity.PlayerDeathEvent.PlayerDeathEvent ( final Player  player,
final List< ItemStack drops,
final int  droppedExp,
final String  deathMessage 
)

Definition at line 19 of file PlayerDeathEvent.java.

org.bukkit.event.entity.PlayerDeathEvent.PlayerDeathEvent ( final Player  player,
final List< ItemStack drops,
final int  droppedExp,
final int  newExp,
final String  deathMessage 
)

Definition at line 23 of file PlayerDeathEvent.java.

org.bukkit.event.entity.PlayerDeathEvent.PlayerDeathEvent ( final Player  player,
final List< ItemStack drops,
final int  droppedExp,
final int  newExp,
final int  newTotalExp,
final int  newLevel,
final String  deathMessage 
)

Definition at line 27 of file PlayerDeathEvent.java.

Member Function Documentation

String org.bukkit.event.entity.PlayerDeathEvent.getDeathMessage ( )

Get the death message that will appear to everyone on the server.

Returns
Message to appear to other players on the server.

Definition at line 54 of file PlayerDeathEvent.java.

Player org.bukkit.event.entity.PlayerDeathEvent.getEntity ( )

Definition at line 36 of file PlayerDeathEvent.java.

References org.bukkit.event.entity.EntityEvent.entity.

boolean org.bukkit.event.entity.PlayerDeathEvent.getKeepInventory ( )

Gets if the Player keeps inventory on death.

Returns
True if the player keeps inventory on death

Definition at line 154 of file PlayerDeathEvent.java.

boolean org.bukkit.event.entity.PlayerDeathEvent.getKeepLevel ( )

Gets if the Player should keep all EXP at respawn.

This flag overrides other EXP settings

Returns
True if Player should keep all pre-death exp

Definition at line 125 of file PlayerDeathEvent.java.

int org.bukkit.event.entity.PlayerDeathEvent.getNewExp ( )

Gets how much EXP the Player should have at respawn.

This does not indicate how much EXP should be dropped, please see getDroppedExp() for that.

Returns
New EXP of the respawned player

Definition at line 66 of file PlayerDeathEvent.java.

int org.bukkit.event.entity.PlayerDeathEvent.getNewLevel ( )

Gets the Level the Player should have at respawn.

Returns
New Level of the respawned player

Definition at line 87 of file PlayerDeathEvent.java.

int org.bukkit.event.entity.PlayerDeathEvent.getNewTotalExp ( )

Gets the Total EXP the Player should have at respawn.

Returns
New Total EXP of the respawned player

Definition at line 105 of file PlayerDeathEvent.java.

void org.bukkit.event.entity.PlayerDeathEvent.setDeathMessage ( String  deathMessage)

Set the death message that will appear to everyone on the server.

Parameters
deathMessageMessage to appear to other players on the server.

Definition at line 45 of file PlayerDeathEvent.java.

void org.bukkit.event.entity.PlayerDeathEvent.setKeepInventory ( boolean  keepInventory)

Sets if the Player keeps inventory on death.

Parameters
keepInventoryTrue to keep the inventory

Definition at line 145 of file PlayerDeathEvent.java.

void org.bukkit.event.entity.PlayerDeathEvent.setKeepLevel ( boolean  keepLevel)

Sets if the Player should keep all EXP at respawn.

This overrides all other EXP settings

Parameters
keepLevelTrue to keep all current value levels

Definition at line 136 of file PlayerDeathEvent.java.

void org.bukkit.event.entity.PlayerDeathEvent.setNewExp ( int  exp)

Sets how much EXP the Player should have at respawn.

This does not indicate how much EXP should be dropped, please see setDroppedExp(int) for that.

Parameters
expNew EXP of the respawned player

Definition at line 78 of file PlayerDeathEvent.java.

void org.bukkit.event.entity.PlayerDeathEvent.setNewLevel ( int  level)

Sets the Level the Player should have at respawn.

Parameters
levelNew Level of the respawned player

Definition at line 96 of file PlayerDeathEvent.java.

void org.bukkit.event.entity.PlayerDeathEvent.setNewTotalExp ( int  totalExp)

Sets the Total EXP the Player should have at respawn.

Parameters
totalExpNew Total EXP of the respawned player

Definition at line 114 of file PlayerDeathEvent.java.


The documentation for this class was generated from the following file: