need help with bukkit InventoryClickEvent

08/17/2019 06:13 Keokix#1
Hey, im making a plugin for my server (Coinflip) and added an InventoryClickEvent which was working a few days ago, but when i run the plugin now, its not working anymore even if i dont rly changed anything, the onclick event is just not getting activated in any ways, as if there wouldnt be someone who clicks anything...

Code:
    [MENTION=555807]event[/MENTION]Handler
    public void onClick(InventoryClickEvent e) {
        Player p = (Player) e.getWhoClicked();
        if (e.getInventory().getTitle().equals("!Choose your color!")) {
            if(e.isRightClick() || e.isLeftClick()){
                e.setCancelled(true);
            }
            colorid.add((short) e.getSlot());
            p.closeInventory();
            p.sendMessage(ChatColor.GREEN + "You created a challenge about " +  MavacsStupidCoinflip.money + "$!");
            sort();

        }
        if(e.getInventory().getTitle().equals("!Coinflip Challenges!")) {
            if(e.isRightClick() || e.isLeftClick()){
                e.setCancelled(true);
            }
        }
    }
this should normaly work but i have completly no idea why its not working...already checked if its because of the name, but its EXACTLY the same name of the inventory
08/17/2019 16:24 ComputerBaer#2
Any exceptions in the log?

Send a message outside of the if's to the player. Is it displayed?
If not, have you registered the EventHandler?

Try it on a local server with a debugger. Then you will see exactly why the name does not match.