From 1db3785307e7e6e3cd64b69a4dca3c9a11a847aa Mon Sep 17 00:00:00 2001 From: Oleksandr Semenishchev <38401696+semenishchev@users.noreply.github.com> Date: Mon, 28 Apr 2025 17:22:05 +0200 Subject: [PATCH] [ci skip] improve javadoc for off-hand swaps through getHotbarButton (#12489) --- .../org/bukkit/event/inventory/InventoryClickEvent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java index 7ef5fbd88b..8730daf029 100644 --- a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java @@ -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;