Dobrý den, chtěl bych pomoc s pluginem, zde je kod:
Kód: Vybrat vše
@EventHandler
public void onInventoryClick(InventoryClickEvent e) {
if(!ChatColor.stripColor(e.getInventory().getName().equalsIgnoreCase("Seznam ukolu")))
return;
Player p = (Player) e.getWhoClicked();
e.setCancelled(true);
if(e.getCurrentItem() == null || e.getCurrentItem().getType()==Material.AIR || !e.getCurrentItem().hasItemMeta()) {
p.closeInventory();
}
}
Chtěl bych se ještě zeptat na toto: hlásí mi chybu "if(!ChatColor.stripColor(e.getInventory().getName().equalsIgnoreCase("Seznam ukolu")))"
Chyba: The method stripColor(String) in the type ChatColor isn't applicable for the arguments (boolean)