/// <summary> /// Loops through all types in the app domain and creates functions in /// the engine for methods that have a JavascriptFunction attribute. /// </summary> protected void CreateScriptFunctions() { JistPlugin.RequestExternalFunctions(); lock (syncRoot) jsEngine.SetValue("alert", new Action <object>(Console.WriteLine)); }
public JistEngine(JistPlugin parent) { this.providedPackages = new List <string>(); this.plugin = parent; this.scriptContainer = new ScriptContainer(this); ServerApi.Hooks.GamePostInitialize.Register(plugin, Game_PostInitialize); PercentChanged += (sender, args) => ConsoleEx.WriteBar(args); }
public JistEngine(JistPlugin parent) { this.providedPackages = new List<string>(); this.plugin = parent; this.scriptContainer = new ScriptContainer(this); ServerApi.Hooks.GamePostInitialize.Register(plugin, Game_PostInitialize); PercentChanged += (sender, args) => ConsoleEx.WriteBar(args); }
public JistRestInterface(JistPlugin plugin) { this._plugin = plugin; TShockAPI.TShock.RestApi.Register(new Rests.SecureRestCommand("/_jist/v1/send", rest_send, "jist.rest.send")); }