package de.fanta.challenges.commands;
import de.fanta.challenges.Challenges;
import de.fanta.challenges.commands.challenges.ChallengeMaxPlayersCommand;
import de.fanta.challenges.commands.challenges.ChallengesBanCommand;
import de.fanta.challenges.commands.challenges.ChallengesCommand;
import de.fanta.challenges.commands.challenges.ChallengesEnderSeeCommand;
import de.fanta.challenges.commands.challenges.ChallengesHelpCommand;
import de.fanta.challenges.commands.challenges.ChallengesInvSeeCommand;
import de.fanta.challenges.commands.challenges.ChallengesKickCommand;
import de.fanta.challenges.commands.challenges.ChallengesMemoryCommand;
import de.fanta.challenges.commands.challenges.ChallengesPingCommand;
import de.fanta.challenges.commands.challenges.ChallengesSaveCommand;
import de.fanta.challenges.commands.event.EventSaveScoresCommand;
import de.fanta.challenges.commands.challenges.ChallengesUnBanCommand;
import de.fanta.challenges.commands.challenges.TeleportCommand;
import de.fanta.challenges.commands.challenges.CheckItemsCommand;
import de.fanta.challenges.commands.coords.CoordsCommand;
import de.fanta.challenges.commands.coords.CoordsDeleteCommand;
import de.fanta.challenges.commands.coords.CoordsGetCommand;
import de.fanta.challenges.commands.coords.CoordsSaveCommand;
import de.fanta.challenges.commands.coords.CoordsShareCommand;
import de.fanta.challenges.commands.coords.CoordsTargetCommand;
import de.fanta.challenges.commands.editor.EditorCommand;
import de.fanta.challenges.commands.editor.EditorSetCommand;
import de.fanta.challenges.commands.event.CreateTeamsCommand;
import de.fanta.challenges.commands.event.EventCommand;
import de.fanta.challenges.commands.event.EventForceTeamCommand;
import de.fanta.challenges.commands.event.EventGetScoreCommand;
import de.fanta.challenges.commands.event.EventSettingsCommand;
import de.fanta.challenges.commands.event.EventStartCommand;
import de.fanta.challenges.commands.event.EventTeamsSetTeamSpawnCommand;
import de.fanta.challenges.commands.event.EventToggleCommand;
import de.fanta.challenges.commands.hp.HPAddCommand;
import de.fanta.challenges.commands.hp.HPGetCommand;
import de.fanta.challenges.commands.hp.HPMaxCommand;
import de.fanta.challenges.commands.hp.HPRemoveCommand;
import de.fanta.challenges.commands.hp.HPSetCommand;
import de.fanta.challenges.commands.reset.ResetCommand;
import de.fanta.challenges.commands.reset.ResetConfirmCommand;
import de.fanta.challenges.commands.settings.SettingsCommand;
import de.fanta.challenges.commands.timer.TimerCommand;
import de.fanta.challenges.commands.timer.TimerGetCommand;
import de.fanta.challenges.commands.timer.TimerPauseCommand;
import de.fanta.challenges.commands.timer.TimerResetCommand;
import de.fanta.challenges.commands.timer.TimerReverseCommand;
import de.fanta.challenges.commands.timer.TimerSetCommand;
import de.fanta.challenges.commands.timer.TimerStartCommand;
import de.iani.cubesideutils.bukkit.MinecraftVersion;
import de.iani.cubesideutils.bukkit.commands.CommandRouter;
public record CommandRegistration(Challenges plugin) {
public void registerCommands() {
CommandRouter challengesRouter = new CommandRouter(plugin.getCommand("challenges"));
challengesRouter.addPluginCommand(plugin.getCommand("adventure"));
challengesRouter.addCommandMapping(new ChallengesCommand(plugin));
challengesRouter.addCommandMapping(new ChallengesHelpCommand(plugin), "help");
challengesRouter.addCommandMapping(new ChallengesKickCommand(plugin), "kick");
challengesRouter.addCommandMapping(new ChallengesBanCommand(plugin), "ban");
challengesRouter.addCommandMapping(new ChallengesUnBanCommand(plugin), "unban");
challengesRouter.addCommandMapping(new ChallengesSaveCommand(plugin), "save");
challengesRouter.addCommandMapping(new ChallengesPingCommand(), "ping");
challengesRouter.addCommandMapping(new ChallengesMemoryCommand(), "mem");
challengesRouter.addCommandMapping(new TeleportCommand(), "tp");
challengesRouter.addCommandMapping(new ChallengeMaxPlayersCommand(), "maxplayer");
challengesRouter.addCommandMapping(new CheckItemsCommand(plugin), "checkitems");
challengesRouter.addCommandMapping(new ChallengesInvSeeCommand(), "invsee");
challengesRouter.addCommandMapping(new ChallengesEnderSeeCommand(), "endersee");
CommandRouter resetRouter = new CommandRouter(plugin.getCommand("reset"));
resetRouter.addCommandMapping(new ResetCommand(plugin));
resetRouter.addCommandMapping(new ResetConfirmCommand(plugin), "confirm");
CommandRouter backpackRouter = new CommandRouter(plugin.getCommand("backpack"));
backpackRouter.addCommandMapping(new BackpackCommand(plugin));
CommandRouter coordsRouter = new CommandRouter(plugin.getCommand("coords"));
coordsRouter.addCommandMapping(new CoordsCommand());
coordsRouter.addCommandMapping(new CoordsShareCommand(), "share");
coordsRouter.addCommandMapping(new CoordsGetCommand(), "get");
coordsRouter.addCommandMapping(new CoordsSaveCommand(plugin), "save");
coordsRouter.addCommandMapping(new CoordsDeleteCommand(), "delete");
if (MinecraftVersion.isAboveOrEqual(1,19,0)) {
coordsRouter.addCommandMapping(new CoordsTargetCommand(plugin), "target");
}
CommandRouter hpRouter = new CommandRouter(plugin.getCommand("hp"));
hpRouter.addCommandMapping(new HPAddCommand(plugin), "add");
hpRouter.addCommandMapping(new HPGetCommand(plugin), "get");
hpRouter.addCommandMapping(new HPMaxCommand(plugin), "max");
hpRouter.addCommandMapping(new HPRemoveCommand(plugin), "remove");
hpRouter.addCommandMapping(new HPSetCommand(plugin), "set");
CommandRouter timerRouter = new CommandRouter(plugin.getCommand("timer"));
timerRouter.addCommandMapping(new TimerCommand(plugin));
timerRouter.addCommandMapping(new TimerPauseCommand(plugin), "pause");
timerRouter.addCommandMapping(new TimerResetCommand(plugin), "reset");
timerRouter.addCommandMapping(new TimerReverseCommand(plugin), "reverse");
timerRouter.addCommandMapping(new TimerSetCommand(plugin), "set");
timerRouter.addCommandMapping(new TimerStartCommand(plugin), "start");
timerRouter.addCommandMapping(new TimerGetCommand(plugin), "get");
CommandRouter forcemlgRouter = new CommandRouter(plugin.getCommand("forcemlg"));
forcemlgRouter.addCommandMapping(new ForceMLGCommand(plugin));
CommandRouter editorRouter = new CommandRouter(plugin.getCommand("editor"));
editorRouter.addCommandMapping(new EditorCommand(plugin));
editorRouter.addCommandMapping(new EditorSetCommand(plugin), "set");
CommandRouter leaveRouter = new CommandRouter(plugin.getCommand("leave"));
leaveRouter.addCommandMapping(new LeaveCommand(plugin));
CommandRouter eventRouter = new CommandRouter(plugin.getCommand("event"));
eventRouter.addCommandMapping(new EventCommand());
eventRouter.addCommandMapping(new EventToggleCommand(plugin, true), "enable");
eventRouter.addCommandMapping(new EventToggleCommand(plugin, false), "disable");
eventRouter.addCommandMapping(new EventSettingsCommand(), "settings");
eventRouter.addCommandMapping(new EventGetScoreCommand(plugin), "getscore");
eventRouter.addCommandMapping(new EventStartCommand(plugin), "start");
eventRouter.addCommandMapping(new CreateTeamsCommand(), "createteams");
eventRouter.addCommandMapping(new EventTeamsSetTeamSpawnCommand(), "setteamspawn");
eventRouter.addCommandMapping(new EventForceTeamCommand(), "forceteam");
eventRouter.addCommandMapping(new EventSaveScoresCommand(plugin), "savescores");
CommandRouter bingoRouter = new CommandRouter(plugin.getCommand("bingo"));
bingoRouter.addCommandMapping(new BingoCommand(plugin));
CommandRouter villageRouter = new CommandRouter(plugin.getCommand("village"));
villageRouter.addCommandMapping(new VillageCommand(plugin));
CommandRouter netherRouter = new CommandRouter(plugin.getCommand("nether"));
netherRouter.addCommandMapping(new NetherToggleCommand(plugin, true), "enable");
netherRouter.addCommandMapping(new NetherToggleCommand(plugin, false), "disable");
CommandRouter settingsRouter = new CommandRouter(plugin.getCommand("settings"));
settingsRouter.addCommandMapping(new SettingsCommand(plugin));
CommandRouter reviveRouter = new CommandRouter(plugin.getCommand("revive"));
reviveRouter.addCommandMapping(new ReviveCommand(plugin));
CommandRouter skipItemRouter = new CommandRouter(plugin.getCommand("skipitem"));
skipItemRouter.addCommandMapping(new SkipItemCommand(plugin));
CommandRouter unlockRouter = new CommandRouter(plugin.getCommand("unlock"));
unlockRouter.addPluginCommand(plugin.getCommand("cremove"));
unlockRouter.addCommandMapping(new ChestUnlockCommand());
}
}