Cleanup / Added server support for scripting

This commit is contained in:
Anuken
2019-12-08 11:00:59 -05:00
parent 07fb5aa88e
commit 9f4d44f0f3
22 changed files with 32 additions and 64 deletions
@@ -357,6 +357,10 @@ public class ServerControl implements ApplicationListener{
}
});
handler.register("js", "<script...>", "Run arbitrary Javascript.", arg -> {
info("&lc" + mods.getScripts().runConsole(arg[0]));
});
handler.register("say", "<message...>", "Send a message to all players.", arg -> {
if(!state.is(State.playing)){
err("Not hosting. Host a game first.");