Skip to content

Commit

Permalink
finish manager
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Jun 29, 2024
1 parent be2e64a commit ef13689
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package me.hsgamer.bettergui.manager;

import io.github.projectunified.minelib.plugin.command.CommandComponent;
import me.hsgamer.bettergui.BetterGUI;
import me.hsgamer.bettergui.Permissions;
import me.hsgamer.bettergui.api.menu.Menu;
import me.hsgamer.hscore.bukkit.command.CommandManager;
import me.hsgamer.hscore.bukkit.utils.MessageUtils;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
Expand Down Expand Up @@ -63,15 +63,15 @@ public void registerMenuCommand(Command command) {
plugin.getLogger().log(Level.WARNING, "Duplicated \"{0}\" command ! Ignored", name);
return;
}
CommandManager.registerCommandToCommandMap(plugin.getName() + "_menu", command);
CommandComponent.registerCommandToCommandMap(plugin.getName() + "_menu", command);
registeredMenuCommand.put(name, command);
}

/**
* Clear all menu commands
*/
public void clearMenuCommand() {
registeredMenuCommand.values().forEach(CommandManager::unregisterFromKnownCommands);
registeredMenuCommand.values().forEach(CommandComponent::unregisterFromKnownCommands);
registeredMenuCommand.clear();
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/me/hsgamer/bettergui/manager/MenuManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public MenuManager(BetterGUI plugin) {
*/
public void loadMenuConfig() {
if (!menusFolder.exists() && menusFolder.mkdirs()) {
plugin.saveResource("menu" + File.separator + "example.yml", false);
plugin.saveResource("menu" + File.separator + "addondownloader.yml", false);
plugin.saveResource("menu/example.yml", false);
plugin.saveResource("menu/addondownloader.yml", false);
}
LinkedList<File> files = new LinkedList<>();
files.add(menusFolder);
Expand Down

0 comments on commit ef13689

Please # to comment.