private void displayCategory(Category c, Player p) { p.sendMessage("----Available Commands and Sub-Categories----"); p.sendMessage("-----------------------------------------"); for (Command com : c.listCommands()) { p.sendMessage(com.toString()); } for (Category subCat : c.listCategories()) { p.sendMessage(subCat.toString()); } }
public String toString() { return "\"" + object + "\" --> " + category.toString(); }