Repository navigation
fix: recheck the robbery cooldown when the victim accepts - #52
Conversation
The guild cooldown was only checked when a robber picked a target. Two members of one guild could each send a request to the same victim before either was accepted, and both robberies went ahead. Accepting now checks the cooldown again and cancels the request if a guildmate's robbery was accepted in the meantime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
Summary
The robbery guild cooldown was only checked when a robber right-clicked a target. A pending request skipped it: two members of one guild could each send a request to the same victim before either was accepted, and both robberies would go through.
acceptRobberynow checks the cooldown again before recording it. If a guildmate's robbery was accepted while this request was pending, the request is cancelled. The victim sees "That robbery request has expired" and the robber is told why.Cooldown audit
I checked every Thievery cooldown against
main:The other two problems I looked into are already fixed on
main:||short-circuit is gone.Members.accountId, so it no longer callsBukkit.getOfflinePlayer(name).Testing
mvn clean verify: 1075 tests pass and the coverage gate is met.RobberyManagerTest.acceptanceRechecksTheGuildCooldownSoPendingRequestsCannotBypassIt.🤖 Generated with Claude Code