类 PlayerDeathByPlayerWithCrystalEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- cn.guangchen233.crystallistener.events.PlayerDeathByPlayerWithCrystalEvent
-
public class PlayerDeathByPlayerWithCrystalEvent extends org.bukkit.event.Event
-
-
构造器概要
构造器 构造器 说明 PlayerDeathByPlayerWithCrystalEvent(org.bukkit.entity.Player killer, org.bukkit.entity.Player deceased, org.bukkit.entity.Entity crystal, org.bukkit.event.entity.EntityDamageByEntityEvent playerDamageEvent, org.bukkit.event.entity.PlayerDeathEvent playerDeathEvent)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 org.bukkit.entity.Entity
getCrystal()
Returns the End Crystal involved in this eventdouble
getDamage()
Gets the raw amount of damage caused by the eventjava.lang.String
getDeathMessage()
Get the death message that will appear to everyone on the server.org.bukkit.entity.Player
getDeceased()
Returns the deceased involved in this eventint
getDroppedExp()
Gets how much EXP should be dropped from this death.java.util.List<org.bukkit.inventory.ItemStack>
getDrops()
Gets all the items which will drop when the entity diesjava.lang.String
getEventName()
double
getFinalDamage()
Gets the amount of damage caused by the event after all damage reduction is applied.static org.bukkit.event.HandlerList
getHandlerList()
org.bukkit.event.HandlerList
getHandlers()
boolean
getKeepInventory()
Gets if the Player keeps inventory on death.boolean
getKeepLevel()
Gets if the Player should keep all EXP at respawn.org.bukkit.entity.Player
getKiller()
Returns the killer involved in this eventint
getNewExp()
Gets how much EXP the Player should have at respawn.int
getNewLevel()
Gets the Level the Player should have at respawn.int
getNewTotalExp()
Gets the Total EXP the Player should have at respawn.boolean
isSuicide()
Gets if the Player is suicide.void
setDeathMessage(java.lang.String deathMessage)
Set the death message that will appear to everyone on the server.void
setDroppedExp(int exp)
Sets how much EXP should be dropped from this death.void
setKeepInventory(boolean keepInventory)
Sets if the Player keeps inventory on death.void
setKeepLevel(boolean keepLevel)
Sets if the Player should keep all EXP at respawn.void
setNewExp(int exp)
Sets how much EXP the Player should have at respawn.void
setNewLevel(int level)
Sets the Level the Player should have at respawn.void
setNewTotalExp(int totalExp)
Sets the Total EXP the Player should have at respawn.java.lang.String
toString()
-
-
-
构造器详细资料
-
PlayerDeathByPlayerWithCrystalEvent
public PlayerDeathByPlayerWithCrystalEvent(org.bukkit.entity.Player killer, org.bukkit.entity.Player deceased, org.bukkit.entity.Entity crystal, org.bukkit.event.entity.EntityDamageByEntityEvent playerDamageEvent, org.bukkit.event.entity.PlayerDeathEvent playerDeathEvent)
-
-
方法详细资料
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()
- 指定者:
getHandlers
在类中org.bukkit.event.Event
-
getEventName
public java.lang.String getEventName()
- 覆盖:
getEventName
在类中org.bukkit.event.Event
-
toString
public java.lang.String toString()
- 覆盖:
toString
在类中java.lang.Object
-
setDeathMessage
public void setDeathMessage(java.lang.String deathMessage)
Set the death message that will appear to everyone on the server.- 参数:
deathMessage
- Message to appear to other players on the server.
-
getDeathMessage
public java.lang.String getDeathMessage()
Get the death message that will appear to everyone on the server.- 返回:
- Message to appear to other players on the server.
-
getKiller
public org.bukkit.entity.Player getKiller()
Returns the killer involved in this event- 返回:
- Killer who is involved in this event
-
getDeceased
public org.bukkit.entity.Player getDeceased()
Returns the deceased involved in this event- 返回:
- Deceased who is involved in this event
-
getCrystal
public org.bukkit.entity.Entity getCrystal()
Returns the End Crystal involved in this event- 返回:
- End Crystal which is involved in this event
-
getKeepInventory
public boolean getKeepInventory()
Gets if the Player keeps inventory on death.- 返回:
- True if the player keeps inventory on death
-
setKeepInventory
public void setKeepInventory(boolean keepInventory)
Sets if the Player keeps inventory on death.- 参数:
keepInventory
- True to keep the inventory
-
getKeepLevel
public boolean getKeepLevel()
Gets if the Player should keep all EXP at respawn.This flag overrides other EXP settings
- 返回:
- True if Player should keep all pre-death exp
-
setKeepLevel
public void setKeepLevel(boolean keepLevel)
Sets if the Player should keep all EXP at respawn.This overrides all other EXP settings
This doesn't prevent the EXP from dropping.
setDroppedExp(int)
should be used stop the EXP from dropping.- 参数:
keepLevel
- True to keep all current value levels
-
getNewExp
public int 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.- 返回:
- New EXP of the respawned player
-
setNewExp
public void 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.- 参数:
exp
- New EXP of the respawned player
-
getNewLevel
public int getNewLevel()
Gets the Level the Player should have at respawn.- 返回:
- New Level of the respawned player
-
setNewLevel
public void setNewLevel(int level)
Sets the Level the Player should have at respawn.- 参数:
level
- New Level of the respawned player
-
getNewTotalExp
public int getNewTotalExp()
Gets the Total EXP the Player should have at respawn.- 返回:
- New Total EXP of the respawned player
-
setNewTotalExp
public void setNewTotalExp(int totalExp)
Sets the Total EXP the Player should have at respawn.- 参数:
totalExp
- New Total EXP of the respawned player
-
getDroppedExp
public int getDroppedExp()
Gets how much EXP should be dropped from this death.This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.
- 返回:
- Amount of EXP to drop.
-
setDroppedExp
public void setDroppedExp(int exp)
Sets how much EXP should be dropped from this death.This does not indicate how much EXP should be taken from the entity in question, merely how much should be created after its death.
- 参数:
exp
- Amount of EXP to drop.
-
getDrops
public java.util.List<org.bukkit.inventory.ItemStack> getDrops()
Gets all the items which will drop when the entity dies- 返回:
- Items to drop when the entity dies
-
getDamage
public double getDamage()
Gets the raw amount of damage caused by the event- 返回:
- The raw amount of damage caused by the event
-
getFinalDamage
public final double getFinalDamage()
Gets the amount of damage caused by the event after all damage reduction is applied.- 返回:
- the amount of damage caused by the event
-
isSuicide
public boolean isSuicide()
Gets if the Player is suicide.- 返回:
- True if Player is suicide.
-
-