@EventHandler(priority = EventPriority.LOWEST) public void onPlayerInteract(PlayerInteractEvent event) { if (PConfManager.getPValBoolean(event.getPlayer(), "jailed")) event.setCancelled(true); Action act = event.getAction(); if (act.equals(Action.PHYSICAL)) return; ItemStack id = event.getItem(); if (id == null) return; int idn = id.getTypeId(); if (idn == 0) return; List<String> cmds = PConfManager.getPValStringList(event.getPlayer(), "assign." + idn); if (cmds == null) return; for (String s : cmds) { if (s.toLowerCase().trim().startsWith("c:")) event.getPlayer().chat(s.trim().substring(2)); else event.getPlayer().performCommand(s.trim()); } }