From 37bda94134d45321dbc5f1f11cedf42ff3ee48e1 Mon Sep 17 00:00:00 2001 From: anth64 Date: Tue, 2 Dec 2025 22:01:06 +0100 Subject: [PATCH] Enforce server-side loading. --- CommandHook/CommandHookModSystem.cs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/CommandHook/CommandHookModSystem.cs b/CommandHook/CommandHookModSystem.cs index b9eff70..2413ed5 100644 --- a/CommandHook/CommandHookModSystem.cs +++ b/CommandHook/CommandHookModSystem.cs @@ -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"); } }