Package dev.lone.itemsadder.api.Events
Class FurnitureInteractEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
dev.lone.itemsadder.api.Events.FurnitureInteractEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class FurnitureInteractEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Event called when a player interacts with a furniture item.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionFurnitureInteractEvent(@NotNull org.bukkit.entity.Player who) Constructor of the event -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.entity.EntityGets the Bukkit entity associated with this event.@Nullable CustomFurnitureGets the custom furniture associated with this event.static @NotNull org.bukkit.event.HandlerListStatic utility method to get the handler list of this event.@NotNull org.bukkit.event.HandlerListGets the handler list of this event.@Nullable StringGets the namespaced ID of the custom furniture.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
FurnitureInteractEvent
public FurnitureInteractEvent(@NotNull @NotNull org.bukkit.entity.Player who) Constructor of the event- Parameters:
who- Player who is interacting with the item.
-
-
Method Details
-
isCancelled
public boolean isCancelled()Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable- Parameters:
cancelled- true if you wish to cancel this event
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()Gets the handler list of this event.- Specified by:
getHandlersin classorg.bukkit.event.Event- Returns:
- Handler list of this event.
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()Static utility method to get the handler list of this event.- Returns:
- Handler list of this event.
-
getFurniture
Gets the custom furniture associated with this event.- Returns:
- The custom furniture, or null if not applicable.
- Throws:
NotActuallyItemsAdderException- Always thrown to indicate this is a placeholder.
-
getNamespacedID
Gets the namespaced ID of the custom furniture.- Returns:
- The namespaced ID, or null if not applicable.
- Throws:
NotActuallyItemsAdderException- Always thrown to indicate this is a placeholder.
-
getBukkitEntity
public org.bukkit.entity.Entity getBukkitEntity()Gets the Bukkit entity associated with this event.- Returns:
- The Bukkit entity.
- Throws:
NotActuallyItemsAdderException- Always thrown to indicate this is a placeholder.
-