diff --git a/pom.xml b/pom.xml
index c68c1da2..f68f580f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
Jobs
jobs
- 5.1.2.2
+ 5.1.3.0
Jobs
http://maven.apache.org
diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java
index 1cc822f9..0d59442e 100644
--- a/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java
+++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsListener.java
@@ -539,13 +539,6 @@ public class JobsListener implements Listener {
@EventHandler(ignoreCancelled = true)
public void onInventoryClick(InventoryClickEvent event) {
- boolean shift = false, numberkey = false;
-
- if (event.getClick() == ClickType.SHIFT_LEFT || event.getClick() == ClickType.SHIFT_RIGHT)
- shift = true;
-
- if (event.getClick() == ClickType.NUMBER_KEY)
- numberkey = true;
SlotType slotType = event.getSlotType();
@@ -555,6 +548,8 @@ public class JobsListener implements Listener {
if (!(event.getWhoClicked() instanceof Player) || event.getCurrentItem() == null)
return;
+ boolean shift = event.getClick() == ClickType.SHIFT_LEFT || event.getClick() == ClickType.SHIFT_RIGHT;
+
ArmorTypes newArmorType = ArmorTypes.matchType(shift ? event.getCurrentItem() : event.getCursor());
if (!shift && newArmorType != null && event.getRawSlot() != newArmorType.getSlot())
return;
@@ -587,6 +582,9 @@ public class JobsListener implements Listener {
}
}
} else {
+
+ boolean numberkey = event.getClick() == ClickType.NUMBER_KEY;
+
ItemStack newArmorPiece = event.getCursor();
ItemStack oldArmorPiece = event.getCurrentItem();
if (numberkey) {