optionally register command

This commit is contained in:
Taah 2022-05-05 18:54:08 -07:00
parent c9da0177ad
commit 8fc2f74275
1 changed files with 10 additions and 2 deletions

View File

@ -66,7 +66,7 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
/**
* Creates an instance of the command
*/
public PlexCommand()
public PlexCommand(boolean register)
{
super("");
this.params = getClass().getAnnotation(CommandParameters.class);
@ -83,7 +83,15 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
this.level = perms.level();
this.commandSource = perms.source();
getMap().register("plex", this);
if (register)
{
getMap().register("plex", this);
}
}
public PlexCommand()
{
this(true);
}
/**