.listener(new InventoryListener<>(InventoryClickEvent.class, new Consumer<InventoryClickEvent>() { @Override public void accept(InventoryClickEvent event) { Bukkit.broadcast(Component.text("ABC")); } }))
I then only see the broadcast message "ABC" when I click on an item within the inventory. If I click on a slot where there is no item, this message is not displayed.
For what I have in mind, it is important that the event is triggered when I click on an empty slot.
Is there an alternative or integrated function that I don't know yet?
.listener(new InventoryListener<>(InventoryClickEvent.class, new Consumer<InventoryClickEvent>() { @Override public void accept(InventoryClickEvent event) { Bukkit.broadcast(Component.text("ABC")); } }))
I then only see the broadcast message "ABC" when I click on an item within the inventory. If I click on a slot where there is no item, this message is not displayed.
For what I have in mind, it is important that the event is triggered when I click on an empty slot.
Is there an alternative or integrated function that I don't know yet?