[ci skip] improve javadoc for off-hand swaps through getHotbarButton (#12489)

This commit is contained in:
Oleksandr Semenishchev 2025-04-28 17:22:05 +02:00 committed by GitHub
parent 952338b33e
commit 1db3785307
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -203,10 +203,10 @@ public class InventoryClickEvent extends InventoryInteractEvent {
/**
* If the ClickType is NUMBER_KEY, this method will return the index of
* the pressed key (0-8).
* the pressed key (0-8) and -1 if player swapped with off-hand (or the action is not NUMBER_KEY).
*
* @return the number on the key minus 1 (range 0-8); or -1 if not
* a NUMBER_KEY action
* @return the number on the key minus 1 (range 0-8);
* or -1 if ClickType is NUMBER_KEY and player did an off-hand swap. Is also -1 if ClickType is not NUMBER_KEY
*/
public int getHotbarButton() {
return this.hotbarKey;