Skip to content

Make armour just take a few seconds to put on - #86

Merged
Drefvelin merged 1 commit into
mainfrom
simplify-armour-donning
Oct 11, 2026
Merged

Drefvelin merged 1 commit into
mainfrom
simplify-armour-donning

Conversation

@Drefvelin

Copy link
Copy Markdown
Contributor

Summary

Armour now just takes a few seconds to put on. The /pvp start armour rules from #72, #76 and #77 are removed.

Kept

  • Each piece takes time to put on. New defaults: helmet 1s, chestplate 4s, leggings 3s, boots 2s (were 1/20/12/8).
  • Pieces go on one at a time, with Slowness and the action-bar progress bar.
  • Sprinting, taking or dealing damage, dying or logging out stops it.
  • Vanilla right-click swaps still go through the timer. Masks, heads, elytras and creative/spectator players are still instant.

Removed

  • /pvp start no longer takes off armour put on in the last armour.recent-seconds.
  • Armour is no longer locked for the whole fight, and the helmet exception for fighters in body armour is gone.
  • Config: armour.recent-seconds, and the messages armour-locked, armour-stripped and armour-stripped-others.

Deploy note

Running servers keep their own plugins/RPCharacters/pvp.yml. Set armour.don-seconds to 1/4/3/2 there and delete the obsolete keys. Leftover keys are ignored.

Testing

  • mvn verify locally. Every armour and PvP test passes, and ArmourDonning has full line coverage again.
  • Three database/grave tests that depend on file permissions fail only when run as root. They fail the same way on unmodified main.

🤖 Generated with Claude Code

Putting armour on now takes 1s for a helmet, 4s for a chestplate, 3s for
leggings and 2s for boots by default, down from 1/20/12/8. Sprinting,
damage, dying and logging out still stop it.

/pvp start no longer touches armour: it doesn't take off armour put on in
the last few minutes, doesn't lock armour for the fight, and has no helmet
exception for fighters in body armour. The armour.recent-seconds setting and
the armour-locked, armour-stripped and armour-stripped-others messages are
gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 876c25e9-b434-49f2-befb-94a3910acbb3

📥 Commits

Reviewing files that changed from the base of the PR and between f720a21 and 1eb3b11.


📒 Files selected for processing (9)
  • src/main/java/net/tfminecraft/rpcharacters/loaders/PvpLoader.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/ArmourDonning.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/PvpCommand.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/PvpSituation.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/PvpSituations.java
  • src/main/resources/pvp.yml
  • src/test/java/net/tfminecraft/rpcharacters/pvp/ArmourDonningTest.java
  • src/test/java/net/tfminecraft/rpcharacters/pvp/PvpCommandTest.java
  • src/test/java/net/tfminecraft/rpcharacters/pvp/PvpSituationTest.java

💤 Files with no reviewable changes (3)
  • src/test/java/net/tfminecraft/rpcharacters/pvp/PvpSituationTest.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/PvpSituation.java
  • src/main/java/net/tfminecraft/rpcharacters/pvp/PvpSituations.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Summary

Summary by CodeRabbit

  • New Features
    • Reduced armour donning times: chestplates now take 4 seconds, leggings 3 seconds and boots 2 seconds.
  • Changes
    • PvP situations no longer restrict armour equipping or remove recently donned armour when a warning starts.
    • Removed configuration options and messages for recent-armour tracking, armour locking and stripped armour. Progress and completion messages remain configurable.

Walkthrough

The pull request reduces chestplate, leggings and boots donning times. It removes recent-armour tracking and PvP armour restrictions, along with their configuration, public methods and related tests.

Changes

PvP armour behaviour

Layer / File(s) Summary
Donning configuration and behaviour
src/main/java/net/tfminecraft/rpcharacters/loaders/PvpLoader.java, src/main/java/net/tfminecraft/rpcharacters/pvp/ArmourDonning.java, src/main/resources/pvp.yml, src/test/java/net/tfminecraft/rpcharacters/pvp/ArmourDonningTest.java
Chestplate, leggings and boots donning times change to 4, 3 and 2 seconds. Recent-armour tracking, removal logic and armour-lock checks are removed. Configuration and tests are updated; the tests also cover a helmet swap when the inventory is full.
PvP situation armour handling
src/main/java/net/tfminecraft/rpcharacters/pvp/PvpSituation.java, src/main/java/net/tfminecraft/rpcharacters/pvp/PvpSituations.java, src/main/java/net/tfminecraft/rpcharacters/pvp/PvpCommand.java, src/test/java/net/tfminecraft/rpcharacters/pvp/PvpCommandTest.java, src/test/java/net/tfminecraft/rpcharacters/pvp/PvpSituationTest.java
PvP situations no longer store which participants wore body armour or expose armour-lock checks. The command no longer strips recently donned armour or cancels armour changes during PvP. The command tests add coverage for situation cleanup on shutdown; armour-related tests are removed.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: xxfran10xx


Merge Risk: ⚪ Minimal · up to 1eb3b

The shorter armour timers and removal of PvP armour restrictions appear consistent across the supplied changes. No issue identified here prevents merging after normal checks.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Drefvelin
Drefvelin merged commit 2359bbb into main Oct 11, 2026
2 checks passed
@Drefvelin
Drefvelin deleted the simplify-armour-donning branch October 11, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant