0

player/console definition and on-the-fly commands

This commit is contained in:
NEMESIS13cz
2016-08-06 18:32:20 +02:00
parent 4c49adc127
commit 36c54e159f
8 changed files with 142 additions and 34 deletions

View File

@@ -16,12 +16,14 @@ public class ExecutableDefinition {
private String permission;
private Method target;
private Object methodContainer;
private Type type;
public ExecutableDefinition(ArrayList<ICommandComponent> cmd, String perm, Method method, Object methodContainer) {
public ExecutableDefinition(ArrayList<ICommandComponent> cmd, String perm, Method method, Object methodContainer, Type type) {
this.components = cmd;
this.permission = perm;
this.target = method;
this.methodContainer = methodContainer;
this.type = type;
}
public boolean valid(int index, String arg) {
@@ -53,6 +55,10 @@ public class ExecutableDefinition {
return permission;
}
public Type getExecType() {
return type;
}
public int getLength() {
return components.size();
}