Skip to content

Commit

Permalink
remove getAllParentMenus
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Oct 15, 2023
1 parent d3b5147 commit d00fe0b
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions src/main/java/me/hsgamer/bettergui/manager/MenuManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,6 @@ public MenuManager(BetterGUI plugin) {
this.menusFolder = new File(plugin.getDataFolder(), "menu");
}

/**
* Get all parent menus from a menu
*
* @param menu the start menu
* @param uuid the unique id
*
* @return all parent menus
*/
public static List<Menu> getAllParentMenu(Menu menu, UUID uuid) {
List<Menu> list = new LinkedList<>();
Optional<Menu> optional = menu.getParentMenu(uuid);
while (optional.isPresent()) {
Menu parentMenu = optional.get();
if (list.contains(parentMenu)) {
break;
}
list.add(parentMenu);
optional = parentMenu.getParentMenu(uuid);
}
return list;
}

/**
* Load the menu config
*/
Expand Down

0 comments on commit d00fe0b

Please sign in to comment.