fix: cancel pending actions on group disband even if not yet a claim link

This commit is contained in:
2026-07-26 09:08:08 +02:00
parent b7ca9fa53b
commit 1c079b7e44
2 changed files with 6 additions and 4 deletions
+3
View File
@@ -285,6 +285,9 @@ public static class ClaimLinkChatCommand
$"'{groupName}' will become a claim link.",
() =>
{
if (!ClaimLinkModSystem.Groups.PlayerGroupsById.ContainsKey(groupId))
return TextCommandResult.Error($"'{groupName}' no longer exists.");
ClaimLinkModSystem.Registry.Add(groupId);
return TextCommandResult.Success($"'{groupName}' is now a claim link.");
}
+3 -4
View File
@@ -210,11 +210,10 @@ public class GroupCommandListener : ICommandHookListener
if (ClaimLinkModSystem.Groups.PlayerGroupsById.ContainsKey(groupId))
return;
if (!ClaimLinkModSystem.Registry.Exists(groupId))
return;
ClaimLinkChatCommand.RemovePendingActionsForGroup(groupId);
ClaimLinkModSystem.Registry.Remove(groupId);
if (ClaimLinkModSystem.Registry.Exists(groupId))
ClaimLinkModSystem.Registry.Remove(groupId);
}
internal static void OnPlayerDisconnect(IServerPlayer player)