From f699cd6d54b1bf5d50fda4255d8b5137e28f34a3 Mon Sep 17 00:00:00 2001 From: anth64 Date: Sat, 18 Jul 2026 11:48:47 +0200 Subject: [PATCH] chore: log adminfree phase and claims found at caller position --- ClaimLink/LandCommandListener.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ClaimLink/LandCommandListener.cs b/ClaimLink/LandCommandListener.cs index 601d6ba..e681558 100644 --- a/ClaimLink/LandCommandListener.cs +++ b/ClaimLink/LandCommandListener.cs @@ -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) { }