Skip to content

Commit

Permalink
sync the menu command
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Aug 7, 2024
1 parent cebe562 commit e367872
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import io.github.projectunified.minelib.plugin.command.CommandComponent;
import me.hsgamer.bettergui.BetterGUI;
import me.hsgamer.bettergui.Permissions;
import me.hsgamer.bettergui.api.addon.PostEnable;
import me.hsgamer.bettergui.api.menu.Menu;
import me.hsgamer.bettergui.config.MessageConfig;
import me.hsgamer.hscore.bukkit.utils.MessageUtils;
Expand All @@ -17,7 +18,7 @@
import java.util.Map;
import java.util.logging.Level;

public class MenuCommandManager implements Loadable {
public class MenuCommandManager implements Loadable, PostEnable {
private final Map<String, Command> registeredMenuCommand = new HashMap<>();
private final BetterGUI plugin;

Expand Down Expand Up @@ -86,6 +87,11 @@ public Map<String, Command> getRegisteredMenuCommand() {
return registeredMenuCommand;
}

@Override
public void onPostEnable() {
CommandComponent.syncCommand();
}

@Override
public void disable() {
clearMenuCommand();
Expand Down

0 comments on commit e367872

Please # to comment.