-
Notifications
You must be signed in to change notification settings - Fork 127
Open
Labels
Description
2024-10-15.18-13-05.mp4
I am using 1.10.2-SNAPSHOT and item gets lost on close and shift clicking does not work.
code I used:
new AnvilGUI.Builder()
.onClose(stateSnapshot -> {
stateSnapshot.getPlayer().sendMessage("You closed the inventory.");
})
.onClick((slot, stateSnapshot) -> { // Either use sync or async variant, not both
System.out.println(slot);
ItemStack leftItem = stateSnapshot.getLeftItem();
ItemStack rightItem = stateSnapshot.getRightItem();
if(slot == Slot.OUTPUT) {
}
return Collections.emptyList();
})
.interactableSlots(Slot.INPUT_LEFT, Slot.INPUT_RIGHT)
.plugin(plugin) //set the plugin instance
.open((Player) event.getPlayer());