fix: cancel pending actions on group disband even if not yet a claim link
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
@@ -210,10 +210,9 @@ public class GroupCommandListener : ICommandHookListener
|
||||
if (ClaimLinkModSystem.Groups.PlayerGroupsById.ContainsKey(groupId))
|
||||
return;
|
||||
|
||||
if (!ClaimLinkModSystem.Registry.Exists(groupId))
|
||||
return;
|
||||
|
||||
ClaimLinkChatCommand.RemovePendingActionsForGroup(groupId);
|
||||
|
||||
if (ClaimLinkModSystem.Registry.Exists(groupId))
|
||||
ClaimLinkModSystem.Registry.Remove(groupId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user