package org.royaldev.royalcommands.gui.inventory;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.ItemStack;

public class ClickListener extends InventoryGUIListener {

    @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
    public void onClick(final InventoryClickEvent e) {
        System.out.println("ClickListener.onClick");
        System.out.println("e = [" + e + "]");
        final InventoryGUI ig = this.getInventoryGUI(e.getInventory());
        final ItemStack clicked = e.getCurrentItem();
        final ClickHandler ch = this.getClickHandler(ig, clicked);
        final Player p = this.getPlayer(e.getWhoClicked());
        if (ch == null || p == null) return;
        if (!ch.onClick(new ClickEvent(clicked, p, e.getSlot()))) {
            e.setCancelled(true);
        }
    }

}

@@ -440,108 +440,8 @@
 ) %7B%0A
-        System.out.println(%22ClickListener.onClick%22);%0A        System.out.println(%22e = %5B%22 + e + %22%5D%22);%0A
     

Debug lines