Compare commits
4
Commits
e435e61a45
...
a668e56622
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a668e56622 | ||
|
|
ba9d4d992b | ||
|
|
a46c0ea8a8 | ||
|
|
6b72350dfe |
@@ -12,6 +12,10 @@
|
|||||||
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
<HintPath>$(VINTAGE_STORY)/VintagestoryAPI.dll</HintPath>
|
||||||
<Private>false</Private>
|
<Private>false</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="CommandHook">
|
||||||
|
<HintPath>$(COMMANDHOOK)/CommandHook.dll</HintPath>
|
||||||
|
<Private>false</Private>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,27 @@
|
|||||||
using Vintagestory.API.Common;
|
using CommandHook;
|
||||||
|
using Vintagestory.API.Common;
|
||||||
|
using Vintagestory.API.Server;
|
||||||
|
|
||||||
namespace ClaimLink;
|
namespace ClaimLink;
|
||||||
|
|
||||||
public class ClaimLinkModSystem : ModSystem
|
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",
|
"type": "Code",
|
||||||
"modid": "claimlink",
|
"modid": "claimlink",
|
||||||
"name": "ClaimLink",
|
"name": "ClaimLink",
|
||||||
|
"side": "Server",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Unknown"
|
"anth64"
|
||||||
],
|
],
|
||||||
"description": "To be added",
|
"description": "Link claims together with groups.",
|
||||||
"version": "1.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"game": "1.21.0"
|
"game": "1.22.3",
|
||||||
|
"commandhook": "2.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user