Upgrade to latest GCIPA

This commit is contained in:
NGnius (Graham) 2020-08-23 11:49:30 -04:00
parent 1a03950b4a
commit ad54fc16fb

View file

@ -7,13 +7,13 @@ using Leadercraft.Server;
namespace Leadercraft namespace Leadercraft
{ {
public class LeadercraftPlugin : IPlugin // the Illusion Plugin Architecture (IPA) will ignore classes that don't implement IPlugin' public class LeadercraftPlugin : IEnhancedPlugin // the Illusion Plugin Architecture (IPA) will ignore classes that don't implement IPlugin'
{ {
public static float LoopDelay = 0.1f; public static float LoopDelay = 0.1f;
public string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name; // mod name public override string Name { get; } = Assembly.GetExecutingAssembly().GetName().Name; // mod name
public string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString(); // mod & assembly version public override string Version { get; } = Assembly.GetExecutingAssembly().GetName().Version.ToString(); // mod & assembly version
internal static LeadercraftApi Api = null; internal static LeadercraftApi Api = null;
@ -45,7 +45,7 @@ namespace Leadercraft
} }
// called when Gamecraft shuts down // called when Gamecraft shuts down
public void OnApplicationQuit() public override void OnApplicationQuit()
{ {
// Shutdown this mod // Shutdown this mod
GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown"); GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown");
@ -55,7 +55,7 @@ namespace Leadercraft
} }
// called when Gamecraft starts up // called when Gamecraft starts up
public void OnApplicationStart() public override void OnApplicationStart()
{ {
// Initialize the Gamecraft modding API first // Initialize the Gamecraft modding API first
GamecraftModdingAPI.Main.Init(); GamecraftModdingAPI.Main.Init();
@ -72,16 +72,6 @@ namespace Leadercraft
//Debug(); //Debug();
} }
// 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)
public static void Debug() public static void Debug()
{ {
tokenUrl = "http://192.168.122.229:1337/token"; tokenUrl = "http://192.168.122.229:1337/token";