Interface ClickContainerEvent
-
- All Superinterfaces:
AffectItemStackEvent
,AffectSlotEvent
,Cancellable
,ChangeInventoryEvent
,Event
,InteractContainerEvent
- All Known Subinterfaces:
ClickContainerEvent.Creative
,ClickContainerEvent.Creative.Drop
,ClickContainerEvent.Creative.Set
,ClickContainerEvent.Double
,ClickContainerEvent.Drag
,ClickContainerEvent.Drag.Middle
,ClickContainerEvent.Drag.Primary
,ClickContainerEvent.Drag.Secondary
,ClickContainerEvent.Drop
,ClickContainerEvent.Drop.Full
,ClickContainerEvent.Drop.Outside
,ClickContainerEvent.Drop.Outside.Primary
,ClickContainerEvent.Drop.Outside.Secondary
,ClickContainerEvent.Drop.Single
,ClickContainerEvent.Middle
,ClickContainerEvent.NumberPress
,ClickContainerEvent.Primary
,ClickContainerEvent.Recipe
,ClickContainerEvent.Recipe.All
,ClickContainerEvent.Recipe.Single
,ClickContainerEvent.Secondary
,ClickContainerEvent.SelectTrade
,ClickContainerEvent.Shift
,ClickContainerEvent.Shift.Primary
,ClickContainerEvent.Shift.Secondary
,CraftItemEvent.Craft
,CraftItemEvent.Preview
,EnchantItemEvent.Post
public interface ClickContainerEvent extends ChangeInventoryEvent, InteractContainerEvent
A click interaction in an open container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ClickContainerEvent.Creative
An interaction with a creative inventory.static interface
ClickContainerEvent.Double
A double-click with the primary mouse buttonstatic interface
ClickContainerEvent.Drag
A completed drag Interaction.static interface
ClickContainerEvent.Drop
An interaction resulting in dropping an item.static interface
ClickContainerEvent.Middle
A click with the middle mouse button.static interface
ClickContainerEvent.NumberPress
A number press swapping the hotbar slot with the slot the mouse hovers over.static interface
ClickContainerEvent.Primary
A click with the primary mouse button.static interface
ClickContainerEvent.Recipe
Fires when the client requests a recipe to be crafted.static interface
ClickContainerEvent.Secondary
A click with the secondary mouse button.static interface
ClickContainerEvent.SelectTrade
Fies when the client requests to select a trade from aTrader
static interface
ClickContainerEvent.Shift
A click with theshift
modifier active-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.item.inventory.ChangeInventoryEvent
ChangeInventoryEvent.Held, ChangeInventoryEvent.Pickup, ChangeInventoryEvent.SwapHand
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.item.inventory.container.InteractContainerEvent
InteractContainerEvent.Close, InteractContainerEvent.Open
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Container
inventory()
Gets theInventory
.Optional<Slot>
slot()
Returns the primary interaction Slot.-
Methods inherited from interface org.spongepowered.api.event.item.inventory.AffectSlotEvent
filter, transactions
-
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
-
Methods inherited from interface org.spongepowered.api.event.item.inventory.container.InteractContainerEvent
container, cursorTransaction
-
-
-
-
Method Detail
-
inventory
default Container inventory()
Description copied from interface:ChangeInventoryEvent
Gets theInventory
.- Specified by:
inventory
in interfaceChangeInventoryEvent
- Returns:
- The inventory
-
slot
Optional<Slot> slot()
Returns the primary interaction Slot.May return
Optional.empty()
for events that do not directly interact with a Slot- Returns:
- The primary interaction Slot
-
-