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...
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
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);
}
}
}