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,8 +83,16 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
|
|||||||
this.level = perms.level();
|
this.level = perms.level();
|
||||||
this.commandSource = perms.source();
|
this.commandSource = perms.source();
|
||||||
|
|
||||||
|
if (register)
|
||||||
|
{
|
||||||
getMap().register("plex", this);
|
getMap().register("plex", this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlexCommand()
|
||||||
|
{
|
||||||
|
this(true);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes the command
|
* Executes the command
|
||||||
|
Loading…
Reference in New Issue
Block a user