mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-22 17:17:37 +00:00
optionally register command
This commit is contained in:
parent
c9da0177ad
commit
8fc2f74275
@ -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,8 +83,16 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
||||
this.level = perms.level();
|
||||
this.commandSource = perms.source();
|
||||
|
||||
if (register)
|
||||
{
|
||||
getMap().register("plex", this);
|
||||
}
|
||||
}
|
||||
|
||||
public PlexCommand()
|
||||
{
|
||||
this(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the command
|
||||
|
Loading…
Reference in New Issue
Block a user