Class SecurityVillagersSelectEvent
java.lang.Object
org.bukkit.event.Event
com.alessiodp.securityvillagers.api.events.BukkitSecurityVillagersEvent
com.alessiodp.securityvillagers.api.events.bukkit.SecurityVillagersSelectEvent
- All Implemented Interfaces:
Cancellable
,ISecurityVillagersSelectEvent
,SecurityVillagersEvent
public class SecurityVillagersSelectEvent
extends BukkitSecurityVillagersEvent
implements ISecurityVillagersSelectEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionSecurityVillagersSelectEvent(org.bukkit.entity.Player player, org.bukkit.entity.Entity selectedEntity, org.bukkit.entity.Entity oldSelection)
-
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.entity.Entity
Get the previously selected entity@NotNull org.bukkit.entity.Player
Get the player@NotNull org.bukkit.entity.Entity
Get the selected entityboolean
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.interfaces.ISecurityVillagersSelectEvent
isUnselection
Methods inherited from interface com.alessiodp.securityvillagers.api.events.SecurityVillagersEvent
getApi, setApi
-
Constructor Details
-
SecurityVillagersSelectEvent
public SecurityVillagersSelectEvent(org.bukkit.entity.Player player, org.bukkit.entity.Entity selectedEntity, org.bukkit.entity.Entity oldSelection)
-
-
Method Details
-
getPlayer
@NotNull public @NotNull org.bukkit.entity.Player getPlayer()Description copied from interface:ISecurityVillagersSelectEvent
Get the player- Specified by:
getPlayer
in interfaceISecurityVillagersSelectEvent
- Returns:
- the
Player
-
getSelectedEntity
@NotNull public @NotNull org.bukkit.entity.Entity getSelectedEntity()Description copied from interface:ISecurityVillagersSelectEvent
Get the selected entity- Specified by:
getSelectedEntity
in interfaceISecurityVillagersSelectEvent
- Returns:
- the
Entity
-
getOldSelection
@Nullable public @Nullable org.bukkit.entity.Entity getOldSelection()Description copied from interface:ISecurityVillagersSelectEvent
Get the previously selected entity- Specified by:
getOldSelection
in interfaceISecurityVillagersSelectEvent
- Returns:
- the
Entity
-
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
-