Class SecurityVillagersDamageEvent
java.lang.Object
org.bukkit.event.Event
com.alessiodp.securityvillagers.api.events.BukkitSecurityVillagersEvent
com.alessiodp.securityvillagers.api.events.bukkit.SecurityVillagersDamageEvent
- All Implemented Interfaces:
ISecurityVillagersDamageEvent
,SecurityVillagersEvent
public class SecurityVillagersDamageEvent
extends BukkitSecurityVillagersEvent
implements ISecurityVillagersDamageEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionSecurityVillagersDamageEvent(org.bukkit.entity.Entity entity, org.bukkit.entity.Entity damager, AttackResult attackResult)
-
Method Summary
Modifier and TypeMethodDescription@NotNull AttackResult
Get the attack result of the event.@NotNull org.bukkit.entity.Entity
Get who is doing damage to the entity@NotNull org.bukkit.entity.Entity
Get the damaged entityvoid
setAttackResult(@NotNull AttackResult attackResult)
Set the attack result of the eventMethods inherited from class com.alessiodp.securityvillagers.api.events.BukkitSecurityVillagersEvent
getApi, getHandlerList, getHandlers, setApi
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.alessiodp.securityvillagers.api.events.SecurityVillagersEvent
getApi, setApi
-
Constructor Details
-
SecurityVillagersDamageEvent
public SecurityVillagersDamageEvent(org.bukkit.entity.Entity entity, org.bukkit.entity.Entity damager, AttackResult attackResult)
-
-
Method Details
-
getEntity
@NotNull public @NotNull org.bukkit.entity.Entity getEntity()Description copied from interface:ISecurityVillagersDamageEvent
Get the damaged entity- Specified by:
getEntity
in interfaceISecurityVillagersDamageEvent
- Returns:
- the
Entity
-
getDamager
@NotNull public @NotNull org.bukkit.entity.Entity getDamager()Description copied from interface:ISecurityVillagersDamageEvent
Get who is doing damage to the entity- Specified by:
getDamager
in interfaceISecurityVillagersDamageEvent
- Returns:
- the
Entity
damager
-
getAttackResult
Description copied from interface:ISecurityVillagersDamageEvent
Get the attack result of the event.- Specified by:
getAttackResult
in interfaceISecurityVillagersDamageEvent
- Returns:
- the
AttackResult
-
setAttackResult
Description copied from interface:ISecurityVillagersDamageEvent
Set the attack result of the event- Specified by:
setAttackResult
in interfaceISecurityVillagersDamageEvent
- Parameters:
attackResult
- the attack result to set, cannot be null
-