Skip to content

Commit

Permalink
✨Some improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusSlover committed Apr 15, 2024
1 parent 3c42181 commit b14b926
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/marcusslover/plus/lib/command/ICommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* The implementation class must have the {@link Command} annotation above the class.
*/
public interface ICommand extends ITabCompleterHelper {
boolean execute(@NotNull CommandContext cmd);
boolean execute(@NotNull CommandContext ctx);

default @NotNull List<@NotNull String> tab(@NotNull TabCompleteContext tab) {
default @NotNull List<@NotNull String> tab(@NotNull TabCompleteContext ctx) {
return Collections.emptyList();
}
}
20 changes: 20 additions & 0 deletions src/main/java/com/marcusslover/plus/lib/item/MenuManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,26 @@ public MenuManager(@NotNull Plugin plugin) {
return this.plugin;
}

/**
* Registers a menu to the manager.
* @param menus the menus
* @return the manager
*/
public @NotNull MenuManager register(@NotNull Menu... menus) {
for (Menu menu : menus) this.addMenu(menu);
return this;
}

/**
* Unregisters a menu from the manager.
* @param menus the menus
* @return the manager
*/
public @NotNull MenuManager unregister(@NotNull Menu... menus) {
for (Menu menu : menus) this.removeMenu(menu);
return this;
}

/**
* Adds a menu to the manager.
*
Expand Down

0 comments on commit b14b926

Please sign in to comment.