fix: clear PendingLoads on /land claim new to match vanilla's unconditional reset

This commit is contained in:
2026-07-26 14:36:37 +02:00
parent 12219e6ef5
commit 3cf6db1d2a
+9
View File
@@ -28,6 +28,7 @@ public class CommandListener : ICommandHookListener
private static readonly Dictionary<string, SubHandler> claimSub = new() private static readonly Dictionary<string, SubHandler> claimSub = new()
{ {
["load"] = ClaimLoad, ["load"] = ClaimLoad,
["new"] = ClaimNew,
["save"] = ClaimSave, ["save"] = ClaimSave,
["cancel"] = ClaimCancel, ["cancel"] = ClaimCancel,
}; };
@@ -99,6 +100,14 @@ public class CommandListener : ICommandHookListener
PendingLoads[caller.Player.PlayerUID] = (int)claimIndex; PendingLoads[caller.Player.PlayerUID] = (int)claimIndex;
} }
private static void ClaimNew(Caller caller, CmdArgs args)
{
if (caller.Player == null)
return;
PendingLoads.Remove(caller.Player.PlayerUID);
}
private static void ClaimCancel(Caller caller, CmdArgs args) private static void ClaimCancel(Caller caller, CmdArgs args)
{ {
if (caller.Player == null) if (caller.Player == null)