commands, ...
This commit is contained in:
parent
66421e806e
commit
75f91dbf4c
44 changed files with 1035 additions and 631 deletions
|
@ -8,15 +8,15 @@ public class PlayerEntityParser extends PlayerParser {
|
|||
super(name, useSender);
|
||||
}
|
||||
|
||||
public Object parse(ScriptEnvironment env, String input) {
|
||||
public Object parse(CommandEnvironment env, String input) {
|
||||
NetHandlerPlayServer net = (NetHandlerPlayServer)super.parse(env, input);
|
||||
EntityNPC entity = net.getEntity();
|
||||
if(entity == null)
|
||||
throw new ScriptException("Spieler-Objekt von '%s' wurde nicht gefunden", input);
|
||||
throw new RunException("Spieler-Objekt von '%s' wurde nicht gefunden", input);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Object getDefault(ScriptEnvironment env) {
|
||||
public Object getDefault(CommandEnvironment env) {
|
||||
NetHandlerPlayServer net = (NetHandlerPlayServer)super.getDefault(env);
|
||||
return net == null ? null : net.getEntity();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue