diff --git a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java index 6e1a1ed..ba3f283 100644 --- a/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java +++ b/Minepacks/src/at/pcgamingfreaks/Minepacks/Bukkit/Listener/ItemShortcut.java @@ -262,6 +262,14 @@ else if((event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.get messageDoNotRemoveItem.send(player); } } + else if((event.getAction() == InventoryAction.HOTBAR_MOVE_AND_READD || event.getAction() == InventoryAction.HOTBAR_SWAP) && event.getClick().name().equals("SWAP_OFFHAND")) + { + if(isItemShortcut(player.getInventory().getItemInOffHand())) + { + event.setCancelled(true); + messageDoNotRemoveItem.send(player); + } + } else if(isItemShortcut(event.getCursor())) { if(!player.getInventory().equals(event.getClickedInventory())) diff --git a/pom.xml b/pom.xml index 2b11031..7dba243 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ pom - 2.3.23 + 2.3.24 UTF-8 UTF-8