2021-01-03 07:21:15 +00:00
|
|
|
package dev.plex.handlers;
|
2020-10-31 08:55:27 +00:00
|
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
2022-01-30 01:31:10 +00:00
|
|
|
import dev.plex.PlexBase;
|
2021-01-03 07:21:15 +00:00
|
|
|
import dev.plex.command.PlexCommand;
|
2022-01-30 01:31:10 +00:00
|
|
|
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;
|
|
|
|
|
2022-02-07 17:07:48 +00:00
|
|
|
//TODO: Switch to Reflections API
|
2022-01-30 01:31:10 +00:00
|
|
|
public class CommandHandler extends PlexBase
|
2020-10-31 08:55:27 +00:00
|
|
|
{
|
|
|
|
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"))
|
2022-01-30 01:31:10 +00:00
|
|
|
{
|
|
|
|
commands.add(new AdminCMD());
|
|
|
|
commands.add(new DeopAllCMD());
|
|
|
|
commands.add(new DeopCMD());
|
|
|
|
commands.add(new OpAllCMD());
|
|
|
|
commands.add(new OpCMD());
|
2022-01-30 20:56:08 +00:00
|
|
|
commands.add(new RankCMD());
|
2022-01-30 01:31:10 +00:00
|
|
|
}
|
2022-02-22 00:20:22 +00:00
|
|
|
if (plugin.config.getBoolean("debug"))
|
|
|
|
{
|
|
|
|
commands.add(new DebugCMD());
|
|
|
|
}
|
|
|
|
|
2022-01-04 03:04:39 +00:00
|
|
|
commands.add(new AdminworldCMD());
|
2020-11-06 03:50:16 +00:00
|
|
|
commands.add(new AdventureCMD());
|
2020-11-10 02:47:03 +00:00
|
|
|
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());
|
2022-01-27 09:00:50 +00:00
|
|
|
commands.add(new ListCMD());
|
2022-02-04 04:01:30 +00:00
|
|
|
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());
|
2022-02-24 06:04:26 +00:00
|
|
|
commands.add(new RawSayCMD());
|
2022-01-04 03:04:39 +00:00
|
|
|
commands.add(new SpectatorCMD());
|
|
|
|
commands.add(new SurvivalCMD());
|
2022-02-22 06:55:59 +00:00
|
|
|
commands.add(new TagCMD());
|
2022-01-30 01:32:16 +00:00
|
|
|
commands.add(new UnbanCMD());
|
2022-02-07 05:53:57 +00:00
|
|
|
commands.add(new UnfreezeCMD());
|
2022-01-04 03:04:39 +00:00
|
|
|
commands.add(new WorldCMD());
|
2020-10-31 08:55:27 +00:00
|
|
|
PlexLog.log(String.format("Registered %s commands!", commands.size()));
|
|
|
|
}
|
|
|
|
}
|