Package simplexity.villagerinfo.events
Class WorkstationRemoveHighlightEvent
java.lang.Object
org.bukkit.event.Event
simplexity.villagerinfo.events.WorkstationRemoveHighlightEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class WorkstationRemoveHighlightEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Called when a workstation highlight is to be removed
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionWorkstationRemoveHighlightEvent
(org.bukkit.entity.Villager villager, org.bukkit.entity.BlockDisplay blockDisplay, org.bukkit.NamespacedKey namespacedKey) -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.BlockDisplay
Gets the BlockDisplay involved in this eventstatic org.bukkit.event.HandlerList
Gets the handler list for this evene@NotNull org.bukkit.event.HandlerList
Gets the handler list for this eveneorg.bukkit.entity.Villager
Gets the villager involved in this eventboolean
Gets if the event has been cancelledvoid
Removes the linked block display from the world, turns the villager's PDC switch off, and removes them from the hashmapvoid
setCancelled
(boolean cancel) Sets whether the event should be cancelledvoid
Turns off a villager's PDC switchMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
WorkstationRemoveHighlightEvent
public WorkstationRemoveHighlightEvent(org.bukkit.entity.Villager villager, org.bukkit.entity.BlockDisplay blockDisplay, org.bukkit.NamespacedKey namespacedKey)
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Gets the handler list for this evene- Specified by:
getHandlers
in classorg.bukkit.event.Event
- Returns:
- HandlerList
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets the handler list for this evene- Returns:
- HandlerList
-
isCancelled
public boolean isCancelled()Gets if the event has been cancelled- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
- Returns:
- boolean
-
setCancelled
public void setCancelled(boolean cancel) Sets whether the event should be cancelled- Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
getVillager
public org.bukkit.entity.Villager getVillager()Gets the villager involved in this event- Returns:
- org.bukkit.entity.Villager
-
getBlockDisplay
public org.bukkit.entity.BlockDisplay getBlockDisplay()Gets the BlockDisplay involved in this event- Returns:
- BlockDisplay
-
setVillagerPDCSwitchOff
public void setVillagerPDCSwitchOff()Turns off a villager's PDC switch -
killBlockDisplay
public void killBlockDisplay()Removes the linked block display from the world, turns the villager's PDC switch off, and removes them from the hashmap
-