mirror of
https://github.com/plexusorg/Plex.git
synced 2024-12-23 01:27: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
|
* Creates an instance of the command
|
||||||
*/
|
*/
|
||||||
public PlexCommand()
|
public PlexCommand(boolean register)
|
||||||
{
|
{
|
||||||
super("");
|
super("");
|
||||||
this.params = getClass().getAnnotation(CommandParameters.class);
|
this.params = getClass().getAnnotation(CommandParameters.class);
|
||||||
@ -83,7 +83,15 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
|||||||
this.level = perms.level();
|
this.level = perms.level();
|
||||||
this.commandSource = perms.source();
|
this.commandSource = perms.source();
|
||||||
|
|
||||||
getMap().register("plex", this);
|
if (register)
|
||||||
|
{
|
||||||
|
getMap().register("plex", this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlexCommand()
|
||||||
|
{
|
||||||
|
this(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user