Class TownyPlayerDamagePlayerEvent
java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.damage.TownyDamageEvent
com.palmergames.bukkit.towny.event.damage.TownyPlayerDamagePlayerEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Part of the API which lets Towny's war and other plugins modify Towny's
plot-permission-decision outcomes.
- Author:
- LlmDl
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTownyPlayerDamagePlayerEvent
(org.bukkit.Location location, org.bukkit.entity.Entity harmedEntity, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause, TownBlock townblock, boolean cancelled, org.bukkit.entity.Player attackingPlayer) Event thrown when a player damages a player. -
Method Summary
Methods inherited from class com.palmergames.bukkit.towny.event.damage.TownyDamageEvent
getCause, getEntity, getLocation, getMessage, getTown, getTownBlock, hasTownBlock, isCancelled, isInWilderness, setCancelled, setMessage
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TownyPlayerDamagePlayerEvent
public TownyPlayerDamagePlayerEvent(org.bukkit.Location location, org.bukkit.entity.Entity harmedEntity, org.bukkit.event.entity.EntityDamageEvent.DamageCause cause, TownBlock townblock, boolean cancelled, org.bukkit.entity.Player attackingPlayer) Event thrown when a player damages a player.- Parameters:
location
- Location of the entity being damaged.harmedEntity
- Entity getting exploded.cause
- DamageCause.townblock
- TownBlock or null if in the wilderness.cancelled
- Whether Towny will cancel this already.attackingPlayer
- Player causing the damage to the harmedEntity.
-
-
Method Details
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getAttackingPlayer
public org.bukkit.entity.Player getAttackingPlayer()- Returns:
- Player harming the other player.
-
getVictimPlayer
public org.bukkit.entity.Player getVictimPlayer()- Returns:
- Player being harmed by another player.
-
getAttackingResident
- Returns:
- Resident object of the attacking player or (unlikely,) null.
-
getVictimResident
- Returns:
- Resident object of the victim player or (unlikely,) null.
-
getAttackerTown
- Returns:
- Town object of the attacking Resident or (unlikely,) null.
-
getVictimTown
- Returns:
- Town object of the victim Resident or (unlikely,) null.
-