Bukkit  1.6.4-R2.0
 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.
 
- 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 18 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 22 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 26 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 53 of file PlayerDeathEvent.java.

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

Definition at line 35 of file PlayerDeathEvent.java.

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

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 124 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 65 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 86 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 104 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 44 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 135 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 77 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 95 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 113 of file PlayerDeathEvent.java.


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