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) { }