mirror of
https://github.com/JEFF-Media-GbR/ChestSort.git
synced 2024-11-26 20:48:12 +01:00
adjusted middle-click hotkey
This commit is contained in:
parent
6ba7854de9
commit
e2d602a727
@ -2,6 +2,7 @@
|
||||
## 8.10.5
|
||||
- ChestSort checks if Minepacks version is recent enough and, if not, disable the Minepacks hook.
|
||||
- Backpacks from Minepacks will no longer be moved into chests with the left-/right-click hotkeys
|
||||
- Middle-Click hotkey is now disabled in Creative mode unless the clicked slot is empty, to allow players to duplicate items just like in vanilla
|
||||
|
||||
## 8.10.4
|
||||
- Fixed exception when sorting inventories in 1.8 because Inventory.getLocation() did not exist yet
|
||||
|
@ -24,8 +24,10 @@ public class ChestSortDebugger implements @NotNull Listener {
|
||||
System.out.println(" ");
|
||||
System.out.println("InventoryClickEvent:");
|
||||
System.out.println("- Holder: " + e.getInventory().getHolder());
|
||||
//System.out.println("- Holder (Class): "+e.getInventory().getHolder().getClass().getName());
|
||||
System.out.println("- Slot: "+e.getRawSlot());
|
||||
System.out.println("- Left-Click: "+e.isLeftClick());
|
||||
System.out.println("- Right-Click: "+e.isRightClick());
|
||||
System.out.println("- Shift-Click: "+e.isShiftClick());
|
||||
System.out.println(" ");
|
||||
}
|
||||
}
|
||||
|
@ -297,7 +297,7 @@ public class ChestSortListener implements Listener {
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST)
|
||||
public void onInventoryClickEvent(InventoryClickEvent event) {
|
||||
public void onHotkey(InventoryClickEvent event) {
|
||||
|
||||
if(!(event.getWhoClicked() instanceof Player)) {
|
||||
return;
|
||||
@ -351,7 +351,13 @@ public class ChestSortListener implements Listener {
|
||||
case MIDDLE:
|
||||
//if(plugin.getConfig().getBoolean("hotkeys.middle-click")) {
|
||||
if(setting.middleClick) {
|
||||
sort=true;
|
||||
if(event.getWhoClicked().getGameMode() != GameMode.CREATIVE) {
|
||||
sort=true;
|
||||
} else {
|
||||
if(event.getCurrentItem()==null || event.getCurrentItem().getType()==Material.AIR) {
|
||||
sort=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DOUBLE_CLICK:
|
||||
|
Loading…
Reference in New Issue
Block a user