Plex/src/main/java/dev/plex/handlers/CommandHandler.java

52 lines
1.6 KiB
Java
Raw Normal View History

2021-01-03 07:21:15 +00:00
package dev.plex.handlers;
import com.google.common.collect.Lists;
import dev.plex.PlexBase;
2021-01-03 07:21:15 +00:00
import dev.plex.command.PlexCommand;
import dev.plex.command.impl.*;
2021-01-03 07:21:15 +00:00
import dev.plex.util.PlexLog;
2022-01-04 03:04:39 +00:00
import java.util.List;
//TODO: Switch to Reflections API
public class CommandHandler extends PlexBase
{
public CommandHandler()
{
2021-06-20 08:02:07 +00:00
List<PlexCommand> commands = Lists.newArrayList();
2022-02-01 06:31:06 +00:00
if (plugin.getSystem().equalsIgnoreCase("ranks"))
{
commands.add(new AdminCMD());
commands.add(new DeopAllCMD());
commands.add(new DeopCMD());
commands.add(new OpAllCMD());
commands.add(new OpCMD());
commands.add(new RankCMD());
}
if (plugin.config.getBoolean("debug"))
{
commands.add(new DebugCMD());
}
2022-01-04 03:04:39 +00:00
commands.add(new AdminworldCMD());
commands.add(new AdventureCMD());
commands.add(new BanCMD());
2022-02-04 21:25:40 +00:00
commands.add(new CommandSpyCMD());
2022-01-04 03:04:39 +00:00
commands.add(new CreativeCMD());
2021-06-20 08:02:07 +00:00
commands.add(new FlatlandsCMD());
2022-01-04 03:04:39 +00:00
commands.add(new FreezeCMD());
commands.add(new ListCMD());
commands.add(new LocalSpawnCMD());
2021-06-20 08:02:07 +00:00
commands.add(new MasterbuilderworldCMD());
2022-01-04 03:04:39 +00:00
commands.add(new NameHistoryCMD());
commands.add(new PlexCMD());
commands.add(new PunishmentsCMD());
commands.add(new SpectatorCMD());
commands.add(new SurvivalCMD());
2022-01-30 01:32:16 +00:00
commands.add(new UnbanCMD());
commands.add(new UnfreezeCMD());
2022-01-04 03:04:39 +00:00
commands.add(new WorldCMD());
PlexLog.log(String.format("Registered %s commands!", commands.size()));
}
}