Return the primary interaction Slot
*/
package org.spongepowered.api.event.item.inventory;
+import org.spongepowered.api.item.inventory.Slot;
+
+import java.util.Optional;
+
public interface ClickInventoryEvent extends ChangeInventoryEvent, InteractInventoryEvent {
+
interface Primary extends ClickInventoryEvent {}
interface Middle extends ClickInventoryEvent {}
interface NumberPress extends ClickInventoryEvent {
int getNumber();
}
+
+ /**
+ * Returns the primary interaction Slot.
+ *
+ * <p>May return {@link Optional#empty()} for events that do not directly interact with a Slot</p>
+ *
+ * @return The primary interaction Slot
+ */
+ Optional<Slot> getSlot();
}
