mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 04:38:35 +00:00
Allow certain commands to bypass queuing
This commit is contained in:
@ -28,6 +28,9 @@ public abstract class AParametricCallable implements CommandCallable {
|
||||
public abstract ParametricBuilder getBuilder();
|
||||
public abstract boolean anyFlags();
|
||||
public abstract Command getCommand();
|
||||
public Command getDefinition() {
|
||||
return getCommand();
|
||||
}
|
||||
public abstract String getGroup();
|
||||
@Override
|
||||
public abstract String toString();
|
||||
|
@ -60,6 +60,7 @@ public class ParametricCallable extends AParametricCallable {
|
||||
private final Set<Character> legacyFlags = new HashSet<Character>();
|
||||
private final SimpleDescription description = new SimpleDescription();
|
||||
private final CommandPermissions commandPermissions;
|
||||
private final Command definition;
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
@ -179,6 +180,7 @@ public class ParametricCallable extends AParametricCallable {
|
||||
|
||||
// Get permissions annotation
|
||||
commandPermissions = method.getAnnotation(CommandPermissions.class);
|
||||
this.definition = definition;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -186,6 +188,11 @@ public class ParametricCallable extends AParametricCallable {
|
||||
return object.getClass().getAnnotation(Command.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Command getDefinition() {
|
||||
return definition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGroup() {
|
||||
return object.getClass().getSimpleName().replaceAll("Commands", "").replaceAll("Util$", "");
|
||||
|
Reference in New Issue
Block a user