/**
 * Copyright (c) 2013. dumptruckman
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package com.dumptruckman.minecraft.actionmenu.listeners.interaction;

import org.bukkit.event.inventory.InventoryClickEvent;
import org.jetbrains.annotations.NotNull;

public enum InventoryAction {
    LEFT_CLICK, RIGHT_CLICK,
    SHIFT_LEFT_CLICK, SHIFT_RIGHT_CLICK,
    ALL_CLICK, ALL_NON_SHIFT_CLICK, ALL_SHIFT_CLICK;

    public boolean isActionSame(@NotNull final InventoryClickEvent event) {
        switch (this) {
            case LEFT_CLICK:
                return event.isLeftClick() && !event.isShiftClick();
            case RIGHT_CLICK:
                return event.isRightClick() && !event.isShiftClick();
            case SHIFT_LEFT_CLICK:
                return event.isLeftClick() && event.isShiftClick();
            case SHIFT_RIGHT_CLICK:
                return event.isRightClick() && event.isShiftClick();
            case ALL_CLICK:
                return true;
            case ALL_NON_SHIFT_CLICK:
                return !event.isShiftClick();
            case ALL_SHIFT_CLICK:
                return event.isShiftClick();
            default:
                return false;
        }
    }
}

@@ -312,16 +312,61 @@
 ction;%0A%0A
+import org.bukkit.event.inventory.ClickType;%0A
 import o
@@ -759,37 +759,34 @@
    return event.
-isLef
+ge
 tClick() && !eve
@@ -782,32 +782,25 @@
 k() 
-&& !event.isShiftClick()
+== ClickType.LEFT
 ;%0A  
@@ -848,38 +848,34 @@
    return event.
-isRigh
+ge
 tClick() && !eve
@@ -871,32 +871,26 @@
 k() 
-&& !event.isShiftClick()
+== ClickType.RIGHT
 ;%0A  
@@ -955,13 +955,10 @@
 ent.
-isLef
+ge
 tCli
@@ -962,39 +962,39 @@
 Click() 
-&& event.isShiftClick()
+== ClickType.SHIFT_LEFT
 ;%0A      
@@ -1056,14 +1056,10 @@
 ent.
-isRigh
+ge
 tCli
@@ -1067,31 +1067,32 @@
 k() 
-&& event.isShiftClick()
+== ClickType.SHIFT_RIGHT
 ;%0A  
@@ -1211,28 +1211,96 @@
 urn 
-!
+(
 event.
-isShiftClick(
+getClick() != ClickType.SHIFT_LEFT) && (event.getClick() != ClickType.SHIFT_RIGHT
 );%0A 
@@ -1359,27 +1359,96 @@
 urn 
+(
 event.
-isShiftClick(
+getClick() == ClickType.SHIFT_LEFT) %7C%7C (event.getClick() == ClickType.SHIFT_RIGHT
 );%0A 

Fix InventoryAction.isActionSame() to use ClickType