Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a668e56622 | ||
|
|
ba9d4d992b | ||
|
|
a46c0ea8a8 | ||
|
|
6b72350dfe |
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user