Class SecurityVillagersInteractProtectionEvent
java.lang.Object
org.bukkit.event.Event
com.alessiodp.securityvillagers.api.events.BukkitSecurityVillagersEvent
com.alessiodp.securityvillagers.api.events.bukkit.SecurityVillagersInteractProtectionEvent
- All Implemented Interfaces:
Cancellable
,ISecurityVillagersInteractProtectionEvent
,SecurityVillagersEvent
public class SecurityVillagersInteractProtectionEvent
extends BukkitSecurityVillagersEvent
implements ISecurityVillagersInteractProtectionEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionSecurityVillagersInteractProtectionEvent(org.bukkit.entity.Entity entity, org.bukkit.entity.Player interactor, InteractType interactType)
-
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.entity.Entity
Get the interacted entity@NotNull org.bukkit.entity.Player
Get who is interacting with the entity@NotNull InteractType
Get the type of interactionboolean
Is the event cancelled?void
setCancelled(boolean cancel)
Set the event as cancelledMethods 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
-
SecurityVillagersInteractProtectionEvent
public SecurityVillagersInteractProtectionEvent(org.bukkit.entity.Entity entity, org.bukkit.entity.Player interactor, InteractType interactType)
-
-
Method Details
-
getEntity
@NotNull public @NotNull org.bukkit.entity.Entity getEntity()Description copied from interface:ISecurityVillagersInteractProtectionEvent
Get the interacted entity- Specified by:
getEntity
in interfaceISecurityVillagersInteractProtectionEvent
- Returns:
- the
Entity
-
getInteractor
@NotNull public @NotNull org.bukkit.entity.Player getInteractor()Description copied from interface:ISecurityVillagersInteractProtectionEvent
Get who is interacting with the entity- Specified by:
getInteractor
in interfaceISecurityVillagersInteractProtectionEvent
- Returns:
- the
Player
interactor
-
getInteractType
Description copied from interface:ISecurityVillagersInteractProtectionEvent
Get the type of interaction- Specified by:
getInteractType
in interfaceISecurityVillagersInteractProtectionEvent
- Returns:
- the
InteractType
-
isCancelled
public boolean isCancelled()Description copied from interface:Cancellable
Is the event cancelled?- Specified by:
isCancelled
in interfaceCancellable
- Returns:
true
if the event is cancelled
-
setCancelled
public void setCancelled(boolean cancel)Description copied from interface:Cancellable
Set the event as cancelled- Specified by:
setCancelled
in interfaceCancellable
- Parameters:
cancel
-true
to cancel
-