From ee04822ac1bf72e33a9c425e6a0712855a03d15b Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 30 Jun 2020 11:42:16 +1000 Subject: [PATCH] SPIGOT-5887: ClickType doesn't include off hand swaps By: md_5 --- .../src/main/java/org/bukkit/event/inventory/ClickType.java | 4 ++++ .../main/java/org/bukkit/event/inventory/InventoryAction.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/inventory/ClickType.java b/paper-api/src/main/java/org/bukkit/event/inventory/ClickType.java index a7440aac91..eb665a8f5a 100644 --- a/paper-api/src/main/java/org/bukkit/event/inventory/ClickType.java +++ b/paper-api/src/main/java/org/bukkit/event/inventory/ClickType.java @@ -53,6 +53,10 @@ public enum ClickType { * Any action done with the Creative inventory open. */ CREATIVE, + /** + * The "swap item with offhand" key (defaults to F). + */ + SWAP_OFFHAND, /** * A type of inventory manipulation not yet recognized by Bukkit. *

diff --git a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryAction.java b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryAction.java index a7bc694bdb..e914873f39 100644 --- a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryAction.java +++ b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryAction.java @@ -68,10 +68,14 @@ public enum InventoryAction { /** * The clicked item is moved to the hotbar, and the item currently there * is re-added to the player's inventory. + * + * The hotbar includes the player's off hand. */ HOTBAR_MOVE_AND_READD, /** * The clicked slot and the picked hotbar slot are swapped. + * + * The hotbar includes the player's off hand. */ HOTBAR_SWAP, /**