Use Google's reflection library to register commands

This commit is contained in:
Focusvity
2022-03-19 14:33:23 +11:00
parent 6a569bb638
commit cc97612101
11 changed files with 97 additions and 41 deletions

View File

@ -5,6 +5,7 @@ import dev.plex.cache.DataUtils;
import dev.plex.command.PlexCommand;
import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions;
import dev.plex.command.annotation.System;
import dev.plex.command.exception.ConsoleOnlyException;
import dev.plex.command.exception.PlayerNotFoundException;
import dev.plex.command.source.RequiredCommandSource;
@ -27,6 +28,7 @@ import org.jetbrains.annotations.Nullable;
@CommandPermissions(level = Rank.OP, source = RequiredCommandSource.ANY)
@CommandParameters(name = "admin", usage = "/<command> <add <player> | remove <player> | setrank <player> <rank> | list>", aliases = "saconfig,slconfig,adminconfig,adminmanage", description = "Manage all admins")
@System("ranks")
public class AdminCMD extends PlexCommand
{
//TODO: Better return messages