Class PlayerItemFrameChangeEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
io.papermc.paper.event.player.PlayerItemFrameChangeEvent
- All Implemented Interfaces:
Cancellable
Called when an
ItemFrame is having an item rotated, added, or removed from it.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Event
Event.Result -
Field Summary
Fields inherited from class PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerItemFrameChangeEvent(Player player, ItemFrame itemFrame, ItemStack itemStack, PlayerItemFrameChangeEvent.ItemFrameChangeAction action) -
Method Summary
Modifier and TypeMethodDescriptionGets the action that was performed on thisItemFrame.static HandlerListGets theItemFrameinvolved in this event.Gets theItemStackinvolved in this event.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.voidsetItemStack(@Nullable ItemStack itemStack) Methods inherited from class PlayerEvent
getPlayerMethods inherited from class Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
PlayerItemFrameChangeEvent
@Internal public PlayerItemFrameChangeEvent(Player player, ItemFrame itemFrame, ItemStack itemStack, PlayerItemFrameChangeEvent.ItemFrameChangeAction action)
-
-
Method Details
-
getItemFrame
-
getItemStack
-
setItemStack
-
getAction
Gets the action that was performed on thisItemFrame.- Returns:
- action performed on the item frame in this event
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableGets 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 interfaceCancellable- Returns:
trueif this event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Description copied from interface:CancellableSets 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 interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-