mirror of
https://github.com/PaperMC/Paper.git
synced 2025-05-19 05:30:23 -07:00
[ci skip] improve javadoc for off-hand swaps through getHotbarButton (#12489)
This commit is contained in:
parent
952338b33e
commit
1db3785307
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user