mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Cleaned up CommandAlias a bit
This commit is contained in:
parent
d64fd95173
commit
93fbad4d82
@ -1,6 +1,6 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
* Copyright (C) 2011 sk89q <http://www.sk89q.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -30,11 +30,11 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
public @interface AliasCommand {
|
public @interface CommandAlias {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return Raw {@link CommandsManager}-formatted command arg array to run
|
* @return Raw {@link CommandsManager}-formatted command arg array to run
|
||||||
*/
|
*/
|
||||||
String[] aliasTo();
|
String[] value();
|
||||||
}
|
}
|
@ -369,9 +369,9 @@ public abstract class CommandsManager<T> {
|
|||||||
} else {
|
} else {
|
||||||
executeMethod(method, args, player, methodArgs, level + 1);
|
executeMethod(method, args, player, methodArgs, level + 1);
|
||||||
}
|
}
|
||||||
} else if (method.isAnnotationPresent(AliasCommand.class)) {
|
} else if (method.isAnnotationPresent(CommandAlias.class)) {
|
||||||
AliasCommand aCmd = method.getAnnotation(AliasCommand.class);
|
CommandAlias aCmd = method.getAnnotation(CommandAlias.class);
|
||||||
executeMethod(parent, aCmd.aliasTo(), player, methodArgs, level);
|
executeMethod(parent, aCmd.value(), player, methodArgs, level);
|
||||||
} else {
|
} else {
|
||||||
Command cmd = method.getAnnotation(Command.class);
|
Command cmd = method.getAnnotation(Command.class);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user