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 interfaceClickContainerEvent.CreativeAn interaction with a creative inventory.static interfaceClickContainerEvent.DoubleA double-click with the primary mouse buttonstatic interfaceClickContainerEvent.DragA completed drag Interaction.static interfaceClickContainerEvent.DropAn interaction resulting in dropping an item.static interfaceClickContainerEvent.MiddleA click with the middle mouse button.static interfaceClickContainerEvent.NumberPressA number press swapping the hotbar slot with the slot the mouse hovers over.static interfaceClickContainerEvent.PrimaryA click with the primary mouse button.static interfaceClickContainerEvent.RecipeFires when the client requests a recipe to be crafted.static interfaceClickContainerEvent.SecondaryA click with the secondary mouse button.static interfaceClickContainerEvent.SelectTradeFies when the client requests to select a trade from aTraderstatic interfaceClickContainerEvent.ShiftA click with theshiftmodifier 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 Containerinventory()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:ChangeInventoryEventGets theInventory.- Specified by:
inventoryin 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
-
-