类 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.EntitygetCrystal()Returns the End Crystal involved in this eventdoublegetDamage()Gets the raw amount of damage caused by the eventjava.lang.StringgetDeathMessage()Get the death message that will appear to everyone on the server.org.bukkit.entity.PlayergetDeceased()Returns the deceased involved in this eventintgetDroppedExp()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.StringgetEventName()doublegetFinalDamage()Gets the amount of damage caused by the event after all damage reduction is applied.static org.bukkit.event.HandlerListgetHandlerList()org.bukkit.event.HandlerListgetHandlers()booleangetKeepInventory()Gets if the Player keeps inventory on death.booleangetKeepLevel()Gets if the Player should keep all EXP at respawn.org.bukkit.entity.PlayergetKiller()Returns the killer involved in this eventintgetNewExp()Gets how much EXP the Player should have at respawn.intgetNewLevel()Gets the Level the Player should have at respawn.intgetNewTotalExp()Gets the Total EXP the Player should have at respawn.booleanisSuicide()Gets if the Player is suicide.voidsetDeathMessage(java.lang.String deathMessage)Set the death message that will appear to everyone on the server.voidsetDroppedExp(int exp)Sets how much EXP should be dropped from this death.voidsetKeepInventory(boolean keepInventory)Sets if the Player keeps inventory on death.voidsetKeepLevel(boolean keepLevel)Sets if the Player should keep all EXP at respawn.voidsetNewExp(int exp)Sets how much EXP the Player should have at respawn.voidsetNewLevel(int level)Sets the Level the Player should have at respawn.voidsetNewTotalExp(int totalExp)Sets the Total EXP the Player should have at respawn.java.lang.StringtoString()
-
-
-
构造器详细资料
-
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.
-
-