Browse Source

Upgrade to latest GCIPA

tags/v1.0.0
NGnius (Graham) 3 years ago
parent
commit
ad54fc16fb
1 changed files with 6 additions and 16 deletions
  1. +6
    -16
      Leadercraft/LeadercraftPlugin.cs

+ 6
- 16
Leadercraft/LeadercraftPlugin.cs View File

@@ -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";