effect command
This commit is contained in:
parent
6c0bd5481f
commit
66421e806e
16 changed files with 393 additions and 16 deletions
|
@ -12,6 +12,8 @@ import game.collect.Maps;
|
|||
import game.Server;
|
||||
import game.color.TextColor;
|
||||
import game.command.commands.CommandHelp;
|
||||
import game.command.commands.CommandMilk;
|
||||
import game.command.commands.CommandPotion;
|
||||
import game.command.commands.CommandSpawn;
|
||||
import game.log.Log;
|
||||
|
||||
|
@ -148,6 +150,7 @@ public class ScriptEnvironment {
|
|||
}
|
||||
|
||||
public List<String> complete(String cmd, ScriptExecutor exec) {
|
||||
this.currentExecutor = exec;
|
||||
List<String> list = Lists.newArrayList();
|
||||
try {
|
||||
String[][] cmds = ArgumentParser.splitString(cmd.endsWith(" ") ? cmd + "END" : cmd);
|
||||
|
@ -174,6 +177,10 @@ public class ScriptEnvironment {
|
|||
}
|
||||
catch(Throwable t) {
|
||||
list.clear();
|
||||
Log.CONSOLE.error(t, "Konnte Befehl nicht vervollständigen");
|
||||
}
|
||||
finally {
|
||||
this.currentExecutor = null;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
@ -194,8 +201,10 @@ public class ScriptEnvironment {
|
|||
return ScriptEnvironment.this.previousOutput == null ? null : ScriptEnvironment.this.previousOutput.toString();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.registerExecutable(new CommandSpawn());
|
||||
this.registerExecutable(new CommandPotion());
|
||||
this.registerExecutable(new CommandMilk());
|
||||
|
||||
this.registerExecutable(new CommandHelp(this));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue