|
|
@@ -7,13 +7,13 @@ using Leadercraft.Server; |
|
|
|
|
|
|
|
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 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; |
|
|
|
|
|
|
@@ -45,7 +45,7 @@ namespace Leadercraft |
|
|
|
} |
|
|
|
|
|
|
|
// called when Gamecraft shuts down |
|
|
|
public void OnApplicationQuit() |
|
|
|
public override void OnApplicationQuit() |
|
|
|
{ |
|
|
|
// Shutdown this mod |
|
|
|
GamecraftModdingAPI.Utility.Logging.LogDebug($"{Name} has shutdown"); |
|
|
@@ -55,7 +55,7 @@ namespace Leadercraft |
|
|
|
} |
|
|
|
|
|
|
|
// called when Gamecraft starts up |
|
|
|
public void OnApplicationStart() |
|
|
|
public override void OnApplicationStart() |
|
|
|
{ |
|
|
|
// Initialize the Gamecraft modding API first |
|
|
|
GamecraftModdingAPI.Main.Init(); |
|
|
@@ -72,17 +72,7 @@ namespace Leadercraft |
|
|
|
//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"; |
|
|
|
criteriaUrl = "http://192.168.122.229:7048/criteria"; |
|
|
|