Skip to content
Permalink
Browse files
pass current MCCommandSender on null for executeas (#1195)
* pass current MCCommandSender on null for executeas

* CH syntax requirements

* use current env not the closures
  • Loading branch information
lukecfairchild committed May 24, 2020
1 parent 0a50d66 commit 2c6dbab202fdd23daffa47754231057186353bd0
Showing 1 changed file with 2 additions and 0 deletions.
@@ -2375,6 +2375,8 @@ public Mixed exec(Target t, Environment environment, Mixed... args) throws Confi
MCCommandSender sender;
if(args[0].val().equals(Static.getConsoleName())) {
sender = Static.getServer().getConsole();
} else if(args[0] instanceof CNull) {
sender = environment.getEnv(CommandHelperEnvironment.class).GetCommandSender();
} else {
sender = Static.GetPlayer(args[0].val(), t);
}

0 comments on commit 2c6dbab

Please sign in to comment.