Class ClickPlan
java.lang.Object
org.geysermc.geyser.inventory.click.ClickPlan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThrown when a request would send more clicks than the session has left this tick -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intClicks a session may send to the Java server per tick. -
Constructor Summary
ConstructorsConstructorDescriptionClickPlan(GeyserSession session, InventoryTranslator<?> translator, Inventory inventory) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidbooleancanStack(int slot, GeyserItemStack item) Test if the item stacks with another item in the specified slot.voidexecute(boolean refresh) voidit.unimi.dsi.fastutil.ints.IntSetgetItem(int slot) booleanisEmpty(int slot) Test if the specified slot is empty.voidsetDesiredBundleSlot(int desiredBundleSlot)
-
Field Details
-
MAX_CLICKS_PER_TICK
public static final int MAX_CLICKS_PER_TICKClicks a session may send to the Java server per tick. Far above what a player does.- See Also:
-
-
Constructor Details
-
ClickPlan
-
-
Method Details
-
add
-
add
-
execute
public void execute(boolean refresh) -
executeForCreativeMode
public void executeForCreativeMode() -
getInventory
-
canStack
Test if the item stacks with another item in the specified slot. This will check the simulated inventory without copying. -
isEmpty
public boolean isEmpty(int slot) Test if the specified slot is empty. This will check the simulated inventory without copying. -
getItem
-
setDesiredBundleSlot
public void setDesiredBundleSlot(int desiredBundleSlot) -
getCursor
-
getAffectedSlots
@Contract("-> new") public it.unimi.dsi.fastutil.ints.IntSet getAffectedSlots()- Returns:
- a new set of all affected slots.
-