using System; using GamecraftModdingAPI.Blocks; namespace GamecraftModdingAPI.Utility { public static class GameClient { private static DebugInterfaceEngine _engine = new DebugInterfaceEngine(); /// /// Saves the extra information to be displayed on the debug view. /// The provided getter function is called each time the view updates so make sure it returns quickly. /// /// A global ID for the custom information /// A function that returns the current information public static void SetDebugInfo(string id, Func contentGetter) => _engine.SetInfo(id, contentGetter); /// /// Removes an information provided by a plugin. /// /// The ID of the custom information /// public static bool RemoveDebugInfo(string id) => _engine.RemoveInfo(id); public static void Init() { GameEngineManager.AddGameEngine(_engine); } } }