You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
- using System.Reflection;
-
- using IllusionPlugin;
- using GamecraftModdingAPI;
-
- namespace Leadercraft
- {
- public class LeadercraftPlugin : IPlugin // the Illusion Plugin Architecture (IPA) will ignore classes that don't implement IPlugin'
- {
- public string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name; // mod name
-
- public string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString(); // mod & assembly version
-
- // called when Gamecraft shuts down
- public void OnApplicationQuit()
- {
- // Shutdown this mod
- GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown");
-
- // Shutdown the Gamecraft modding API last
- GamecraftModdingAPI.Main.Shutdown();
- }
-
- // called when Gamecraft starts up
- public void OnApplicationStart()
- {
- // Initialize the Gamecraft modding API first
- GamecraftModdingAPI.Main.Init();
- // check out the modding API docs here: https://mod.exmods.org/
-
- // Initialize this mod
-
- GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has started up");
- }
-
- // unused methods
-
- public void OnFixedUpdate() { } // called once per physics update
-
- public void OnLevelWasInitialized(int level) { } // called after a level is initialized
-
- public void OnLevelWasLoaded(int level) { } // called after a level is loaded
-
- public void OnUpdate() { } // called once per rendered frame (frame update)
- }
- }
|