Compare commits

..
4 Commits
5 changed files with 56 additions and 6 deletions
+4
View File
@@ -12,6 +12,10 @@
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="CommandHook">
<HintPath>$(COMMANDHOOK)/CommandHook.dll</HintPath>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
+21 -1
View File
@@ -1,7 +1,27 @@
using Vintagestory.API.Common;
using CommandHook;
using Vintagestory.API.Common;
using Vintagestory.API.Server;
namespace ClaimLink;
public class ClaimLinkModSystem : ModSystem
{
internal ClaimLinkCommandListener? cmdListener;
public override bool ShouldLoad(EnumAppSide forSide) => forSide == EnumAppSide.Server;
public override void StartServerSide(ICoreServerAPI api)
{
cmdListener = new ClaimLinkCommandListener();
CommandHookModSystem.Register(cmdListener);
}
public override void Dispose()
{
if (cmdListener == null)
return;
CommandHookModSystem.Unregister(cmdListener);
}
}
+24
View File
@@ -0,0 +1,24 @@
using Vintagestory.API.Common;
using System.Collections.Generic;
using CommandHook;
namespace ClaimLink;
public class ClaimLinkCommandListener : ICommandHookListener
{
public string ModId => "claimlink";
public IReadOnlyList<string> Commands => new[] { "land" };
public CommandRegistration Registration => new(Before, After);
private TextCommandResult? Before(TextCommandCallingArgs args)
{
return null;
}
private void After(TextCommandCallingArgs args, TextCommandResult result)
{
}
}
+6 -4
View File
@@ -3,12 +3,14 @@
"type": "Code",
"modid": "claimlink",
"name": "ClaimLink",
"side": "Server",
"authors": [
"Unknown"
"anth64"
],
"description": "To be added",
"version": "1.0.0",
"description": "Link claims together with groups.",
"version": "0.0.0",
"dependencies": {
"game": "1.21.0"
"game": "1.22.3",
"commandhook": "2.1.0"
}
}
Regular → Executable
View File