chore: log adminfree phase and claims found at caller position

This commit is contained in:
2026-07-18 11:55:24 +02:00
parent 94b6723456
commit f699cd6d54
+17 -1
View File
@@ -135,7 +135,23 @@ public class ClaimLinkCommandListener : ICommandHookListener
private static void List(Caller caller, CmdArgs args, TextCommandResult? result) { }
private static void AdminFree(Caller caller, CmdArgs args, TextCommandResult? result) { }
private static void AdminFree(Caller caller, CmdArgs args, TextCommandResult? result)
{
if (caller.Player == null)
return;
LandClaim[] claims = ClaimLinkModSystem.LandClaimAPI.Get(
caller.Player.Entity.Pos.AsBlockPos
);
string phase = result == null ? "before" : $"after (status={result.Status})";
ClaimLinkModSystem.Logger.Notification(
$"claimlink: adminfree {phase}: {claims.Length} claim(s) at position"
);
foreach (LandClaim c in claims)
ClaimLinkModSystem.Logger.Notification($"claimlink: owned by {c.OwnedByPlayerUid}");
}
private static void ClaimNew(Caller caller, CmdArgs args, TextCommandResult? result) { }