1
0
mirror of https://github.com/Zrips/Jobs.git synced 2024-12-29 04:18:07 +01:00

Version up

This commit is contained in:
Zrips 2023-05-03 15:31:09 +03:00
parent b7f6de7965
commit 35e4b81b1d
2 changed files with 6 additions and 8 deletions

View File

@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>Jobs</groupId>
<artifactId>jobs</artifactId>
<version>5.1.2.2</version>
<version>5.1.3.0</version>
<name>Jobs</name>
<url>http://maven.apache.org</url>

View File

@ -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) {