Class PlayerOpenEnderChestEvent
java.lang.Object
fr.fidorial.event.player.PlayerOpenEnderChestEvent
- All Implemented Interfaces:
Cancellable, Event, PlayerEvent
Fired right before a player opens an ender chest.
Cancelling the event keeps the container closed.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerOpenEnderChestEvent(Player player, BlockPos position, EnderChestInventory enderChest) Creates an event. -
Method Summary
Modifier and TypeMethodDescriptionReturns the container about to be displayed; changes made to it are kept.booleanReturnstrueif the action this event describes will not happen.player()Returns the player involved in this event.position()Returns the position of the ender chest block.voidsetCancelled(boolean cancelled) Prevents or re-allows the action this event describes.
-
Constructor Details
-
PlayerOpenEnderChestEvent
Creates an event.- Parameters:
player- the player opening the ender chestposition- the position of the ender chest blockenderChest- the container about to be displayed- Since:
- 0.1.0
-
-
Method Details
-
player
Description copied from interface:PlayerEventReturns the player involved in this event.- Specified by:
playerin interfacePlayerEvent- Returns:
- the player involved in this event
-
position
Returns the position of the ender chest block.- Returns:
- the position of the ender chest block
- Since:
- 0.1.0
-
enderChest
Returns the container about to be displayed; changes made to it are kept.- Returns:
- the container about to be displayed; changes made to it are kept
- Since:
- 0.1.0
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableReturnstrueif the action this event describes will not happen.- Specified by:
isCancelledin interfaceCancellable- Returns:
trueif the action this event describes will not happen
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellablePrevents or re-allows the action this event describes.- Specified by:
setCancelledin interfaceCancellable- Parameters:
cancelled-trueto prevent it
-