feat: hook /land claim load/cancel and dump claim info via admin info
Intercepts vanilla /land claim load|cancel to track a per-player pending claim selection, and wires LandClaimAPI/Logger through ModSystem so admin info can dump full claim state for debugging.
This commit is contained in:
@@ -113,7 +113,7 @@ public static class ClaimLinkChatCommand
|
||||
admin.EndSubCommand();
|
||||
}
|
||||
|
||||
public static TextCommandResult New(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink new");
|
||||
public static TextCommandResult New(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlinknew");
|
||||
public static TextCommandResult Link(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink link");
|
||||
public static TextCommandResult Confirm(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink confirm");
|
||||
public static TextCommandResult Cancel(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink cancel");
|
||||
@@ -127,5 +127,49 @@ public static class ClaimLinkChatCommand
|
||||
public static TextCommandResult AdminUnlink(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink admin unlink");
|
||||
public static TextCommandResult AdminKick(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink admin kick");
|
||||
public static TextCommandResult AdminTransferOwnership(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink admin transferownership");
|
||||
public static TextCommandResult AdminInfo(TextCommandCallingArgs args) => TextCommandResult.Success("stub: claimlink admin info");
|
||||
public static TextCommandResult AdminInfo(TextCommandCallingArgs args)
|
||||
{
|
||||
ClaimLinkModSystem.Logger.Notification("Number of Claims: {0}", ClaimLinkModSystem.LandClaimAPI.All.Count);
|
||||
foreach (LandClaim claim in ClaimLinkModSystem.LandClaimAPI.All)
|
||||
{
|
||||
string padding = new string('-', claim.Description.Length);
|
||||
ClaimLinkModSystem.Logger.Notification("---{0}---", claim.Description);
|
||||
ClaimLinkModSystem.Logger.Notification("Owner (Entity ID): {0}", claim.OwnedByEntityId);
|
||||
ClaimLinkModSystem.Logger.Notification("Owner (Player UID): {0}", claim.OwnedByPlayerUid);
|
||||
ClaimLinkModSystem.Logger.Notification("Last Known Owner Name: {0}", claim.LastKnownOwnerName);
|
||||
ClaimLinkModSystem.Logger.Notification("Permitted Player Group IDs({0})", claim.PermittedPlayerGroupIds.Count);
|
||||
foreach (var groupId in claim.PermittedPlayerGroupIds)
|
||||
{
|
||||
ClaimLinkModSystem.Logger.Notification(" <{0},{1}>", groupId.Key, groupId.Value);
|
||||
}
|
||||
ClaimLinkModSystem.Logger.Notification("Permitted Player UIDs({0})", claim.PermittedPlayerUids.Count);
|
||||
foreach (var permittedPlayerUid in claim.PermittedPlayerUids)
|
||||
{
|
||||
ClaimLinkModSystem.Logger.Notification(" <{0},{1}>", permittedPlayerUid.Key, permittedPlayerUid.Value);
|
||||
}
|
||||
ClaimLinkModSystem.Logger.Notification("Permitted Player Last Known Player Name({0})", claim.PermittedPlayerLastKnownPlayerName.Count);
|
||||
foreach (var permittedPlayerLastKnownPlayerName in claim.PermittedPlayerLastKnownPlayerName)
|
||||
{
|
||||
ClaimLinkModSystem.Logger.Notification(" <{0},{1}>", permittedPlayerLastKnownPlayerName.Key, permittedPlayerLastKnownPlayerName.Value);
|
||||
}
|
||||
ClaimLinkModSystem.Logger.Notification("Owner (Player Group UID): {0}", claim.OwnedByPlayerGroupUid);
|
||||
ClaimLinkModSystem.Logger.Notification("Protection Level: {0}", claim.ProtectionLevel);
|
||||
ClaimLinkModSystem.Logger.Notification("Center: ({0}, {1}, {2})", claim.Center.X, claim.Center.Y, claim.Center.Z);
|
||||
ClaimLinkModSystem.Logger.Notification("Size XYZ: ({0})", claim.SizeXYZ);
|
||||
ClaimLinkModSystem.Logger.Notification("Size XZ: ({0})", claim.SizeXZ);
|
||||
ClaimLinkModSystem.Logger.Notification("Areas ({0}):", claim.Areas.Count);
|
||||
for (int i = 0; i < claim.Areas.Count; i++)
|
||||
{
|
||||
var area = claim.Areas[i];
|
||||
ClaimLinkModSystem.Logger.Notification(
|
||||
" [{0}] Min: ({1}, {2}, {3}) Max: ({4}, {5}, {6})",
|
||||
i, area.X1, area.Y1, area.Z1, area.X2, area.Y2, area.Z2
|
||||
);
|
||||
}
|
||||
ClaimLinkModSystem.Logger.Notification("---{0}---\n", padding);
|
||||
}
|
||||
|
||||
|
||||
return TextCommandResult.Success("stub: claimlink admin info");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user