Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.event.entity.PlayerDeathEvent Class Reference
Inheritance diagram for org.bukkit.event.entity.PlayerDeathEvent:
org.bukkit.event.entity.EntityDeathEvent org.bukkit.event.entity.EntityEvent org.bukkit.event.Event

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)
 
String getDeathMessage ()
 
int getNewExp ()
 
void setNewExp (int exp)
 
int getNewLevel ()
 
void setNewLevel (int level)
 
int getNewTotalExp ()
 
void setNewTotalExp (int totalExp)
 
boolean getKeepLevel ()
 
void setKeepLevel (boolean keepLevel)
 
- 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 ()
 
void setDroppedExp (int exp)
 
List< ItemStackgetDrops ()
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.entity.EntityEvent
 EntityEvent (final Entity what)
 
Entity getEntity ()
 
EntityType getEntityType ()
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 
 Event (boolean isAsync)
 
String getEventName ()
 
abstract HandlerList getHandlers ()
 
final boolean isAsynchronous ()
 

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.

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.

53  {
54  return deathMessage;
55  }
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.

124  {
125  return keepLevel;
126  }
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.

65  {
66  return newExp;
67  }
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.

86  {
87  return newLevel;
88  }
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.

104  {
105  return newTotalExp;
106  }
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.

44  {
45  this.deathMessage = deathMessage;
46  }
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.

135  {
136  this.keepLevel = keepLevel;
137  }
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.

77  {
78  newExp = exp;
79  }
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.

95  {
96  newLevel = level;
97  }
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.

113  {
114  newTotalExp = totalExp;
115  }

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