Class PlayerKillPlayerEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
de.marcely.bedwars.api.event.player.PlayerIngameDeathEvent
de.marcely.bedwars.api.event.player.PlayerKillPlayerEvent
- All Implemented Interfaces:
ArenaEvent
Gets called when someone is killing someone else during a game
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
-
Constructor Summary
ConstructorDescriptionPlayerKillPlayerEvent
(PlayerDeathEvent bukkitEvent, Arena arena, boolean fatalDeath, Message deathMessage, Set<Player> deathMessageTargets, int deathSpectateDuration, Player killer, PlayerDamageInfo damageInfo) -
Method Summary
Modifier and TypeMethodDescriptiongetCause()
Returns the cause of his death.Returns the player that has been killed byPlayerEvent.getPlayer()
.Get the past damage info of when the damager directly or indirectly damaged the killed player of this event.static HandlerList
Returns the player who killed the other player.@Nullable Projectile
Returns the projectile that thePlayerEvent.getPlayer()
might have used to kill the player.Methods inherited from class de.marcely.bedwars.api.event.player.PlayerIngameDeathEvent
addDeathMessageTarget, addDeathMessageTargets, getArena, getBukkitEvent, getDeathMessage, getDeathMessageTargets, getDeathSpectateDuration, isDeathSpectating, isFatalDeath, removeDeathMessageTarget, removeDeathMessageTargets, setDeathMessage, setDeathSpectateDuration, setFatalDeath
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerKillPlayerEvent
public PlayerKillPlayerEvent(PlayerDeathEvent bukkitEvent, Arena arena, boolean fatalDeath, Message deathMessage, Set<Player> deathMessageTargets, int deathSpectateDuration, Player killer, PlayerDamageInfo damageInfo)
-
-
Method Details
-
getDamaged
Returns the player that has been killed byPlayerEvent.getPlayer()
.This method returns the same exact player as
PlayerEvent.getPlayer()
.- Returns:
- The killed/damaged player
-
getKiller
Returns the player who killed the other player.- Returns:
- The killer
-
getCause
Returns the cause of his death.- Returns:
- The last DamageCause he received
-
getProjectile
Returns the projectile that thePlayerEvent.getPlayer()
might have used to kill the player.Might return
null
, meaning that he didn't use any projectile- Returns:
- The projectile that was used to kill him
-
getDamageInfo
Get the past damage info of when the damager directly or indirectly damaged the killed player of this event.- Returns:
- The related damage info of this event
-
getHandlers
- Overrides:
getHandlers
in classPlayerIngameDeathEvent
-
getHandlerList
-