Enforce server-side loading.
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
using Vintagestory.API.Client;
|
using Vintagestory.API.Server;
|
||||||
using Vintagestory.API.Server;
|
|
||||||
using Vintagestory.API.Config;
|
|
||||||
using Vintagestory.API.Common;
|
using Vintagestory.API.Common;
|
||||||
|
|
||||||
namespace CommandHook;
|
namespace CommandHook;
|
||||||
@@ -8,21 +6,15 @@ namespace CommandHook;
|
|||||||
public class CommandHookModSystem : ModSystem
|
public class CommandHookModSystem : ModSystem
|
||||||
{
|
{
|
||||||
|
|
||||||
// Called on server and client
|
public override bool ShouldLoad(EnumAppSide forSide)
|
||||||
// Useful for registering block/entity classes on both sides
|
|
||||||
public override void Start(ICoreAPI api)
|
|
||||||
{
|
{
|
||||||
Mod.Logger.Notification("Hello from template mod: " + api.Side);
|
return forSide == EnumAppSide.Server;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public override void StartServerSide(ICoreServerAPI api)
|
public override void StartServerSide(ICoreServerAPI api)
|
||||||
{
|
{
|
||||||
Mod.Logger.Notification("Hello from template mod server side: " + Lang.Get("commandhook:hello"));
|
Mod.Logger.Notification("Loaded");
|
||||||
}
|
|
||||||
|
|
||||||
public override void StartClientSide(ICoreClientAPI api)
|
|
||||||
{
|
|
||||||
Mod.Logger.Notification("Hello from template mod client side: " + Lang.Get("commandhook:hello"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user