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
ConstructorsConstructorDescriptionSecurityVillagersInteractProtectionEvent(org.bukkit.entity.Entity entity, org.bukkit.entity.Player interactor, InteractType interactType) -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.entity.EntityGet the interacted entity@NotNull org.bukkit.entity.PlayerGet who is interacting with the entity@NotNull InteractTypeGet the type of interactionbooleanIs the event cancelled?voidsetCancelled(boolean cancel)Set the event as cancelledMethods inherited from class com.alessiodp.securityvillagers.api.events.BukkitSecurityVillagersEvent
getApi, getHandlerList, getHandlers, setApiMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronousMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:ISecurityVillagersInteractProtectionEventGet the interacted entity- Specified by:
getEntityin interfaceISecurityVillagersInteractProtectionEvent- Returns:
- the
Entity
-
getInteractor
@NotNull public @NotNull org.bukkit.entity.Player getInteractor()Description copied from interface:ISecurityVillagersInteractProtectionEventGet who is interacting with the entity- Specified by:
getInteractorin interfaceISecurityVillagersInteractProtectionEvent- Returns:
- the
Playerinteractor
-
getInteractType
Description copied from interface:ISecurityVillagersInteractProtectionEventGet the type of interaction- Specified by:
getInteractTypein interfaceISecurityVillagersInteractProtectionEvent- Returns:
- the
InteractType
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableIs the event cancelled?- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif the event is cancelled
-
setCancelled
public void setCancelled(boolean cancel)Description copied from interface:CancellableSet the event as cancelled- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancel-trueto cancel
-