Enforce server-side loading.

This commit is contained in:
2025-12-02 22:01:06 +01:00
parent b3e201a7e9
commit 37bda94134
+5 -13
View File
@@ -1,6 +1,4 @@
using Vintagestory.API.Client;
using Vintagestory.API.Server;
using Vintagestory.API.Config;
using Vintagestory.API.Server;
using Vintagestory.API.Common;
namespace CommandHook;
@@ -8,21 +6,15 @@ namespace CommandHook;
public class CommandHookModSystem : ModSystem
{
// Called on server and client
// Useful for registering block/entity classes on both sides
public override void Start(ICoreAPI api)
public override bool ShouldLoad(EnumAppSide forSide)
{
Mod.Logger.Notification("Hello from template mod: " + api.Side);
return forSide == EnumAppSide.Server;
}
public override void StartServerSide(ICoreServerAPI api)
{
Mod.Logger.Notification("Hello from template mod server side: " + Lang.Get("commandhook:hello"));
}
public override void StartClientSide(ICoreClientAPI api)
{
Mod.Logger.Notification("Hello from template mod client side: " + Lang.Get("commandhook:hello"));
Mod.Logger.Notification("Loaded");
}
}