Skip to content

feat: create plushies from character wardrobe outfits - #124

Merged
ryanbarlow97 merged 1 commit into
mainfrom
feat/wardrobe-head-command
Oct 17, 2026
Merged

ryanbarlow97 merged 1 commit into
mainfrom
feat/wardrobe-head-command

Conversation

@ryanbarlow97

@ryanbarlow97 ryanbarlow97 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Staff can run /plushie grinkle 1 to receive a Grinkle Plushie made from that character's Base wardrobe skin. Outfits 2 and 3 select the extra slots; omitting the number selects Base. Character names may contain spaces, and UUIDs disambiguate duplicate names. The command requires rpchar.plushie.give (operators by default).

The command fetches the selected saved outfit asynchronously, including for offline owners, without equipping it or reading the player's current mask. It embeds an explicit texture property with a stable profile identity, so issued heads keep their appearance after later skin changes and repeated copies use matching profile data. Missing, locked, unsigned or mismatched results give nothing. Delivery is cancelled after disconnect, permission loss or a character switch, and a full inventory does not drop the item.

Requires ProvinceSystem #259 to be deployed first. No deployment or live server test was performed. Placed heads may lose their item name when broken; this change embeds captured texture data. Full placement/break behavior still requires a live test.

Validation: tfmc-mvn -o -B --no-transfer-progress clean verify passed all 2,520 tests with zero failures, errors or skips; the repository's zero-missed-lines coverage gate passed. Focused tests cover exact outfit selection, immutable texture properties and profile identity, failed lookups, permissions, inventory capacity, pending requests and character/session changes.

Documentation: Docs #288.

@github-actions github-actions Bot added the size:L 100-499 effective changed lines (tests excluded in mixed PRs). label Oct 16, 2026
@coderabbitai

coderabbitai Bot commented Oct 16, 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: 813813b8-ddb5-4fe2-a056-fc2f09336653
📥 Commits

Reviewing files that changed from the base of the PR and between 5ebf516 and b4bce79.

📒 Files selected for processing: 6
  • src/main/java/net/tfminecraft/rpcharacters/RPCharacters.java
  • src/main/java/net/tfminecraft/rpcharacters/api/ProvinceSystemClient.java
  • src/main/java/net/tfminecraft/rpcharacters/wardrobe/PlushieCommand.java
  • src/main/resources/plugin.yml
  • src/test/java/net/tfminecraft/rpcharacters/api/ProvinceSystemClientTest.java
  • src/test/java/net/tfminecraft/rpcharacters/wardrobe/PlushieCommandTest.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
    • Added the /plushie command, allowing permitted players to create a player-head plushie using a character’s saved outfit. Choose an outfit number from 1 to 3; if omitted, outfit 1 is used. Character names must identify exactly one character.
  • Bug Fixes
    • Plushies are only created when the selected outfit is available, the player remains online and permitted, their character session is unchanged, and inventory space is available.

Adds the /plushie command to create a player-head plushie from a character’s selected wardrobe outfit. The command validates the request, loads the outfit skin asynchronously, and checks player state before adding the item.

Changes: Plushie command

Layer / File(s) Summary
Wardrobe skin lookup
src/main/java/net/tfminecraft/rpcharacters/api/ProvinceSystemClient.java, src/test/java/net/tfminecraft/rpcharacters/api/ProvinceSystemClientTest.java
fetchWardrobeSkin validates player and character IDs and accepts only base, extra_1 or extra_2. Tests cover rejected inputs and GET requests for valid slots.
Plushie command and delivery
src/main/java/net/tfminecraft/rpcharacters/wardrobe/PlushieCommand.java, src/main/java/net/tfminecraft/rpcharacters/RPCharacters.java, src/main/resources/plugin.yml, src/test/java/net/tfminecraft/rpcharacters/wardrobe/PlushieCommandTest.java
Registers /plushie with operator-default permission. The command resolves a character and outfit, loads the skin asynchronously, and creates a player head only when the player, session, skin and inventory checks pass. Tests cover command handling, skin validation and delivery conditions.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor Player
  participant PlushieCommand
  participant ProvinceSystemClient
  participant BukkitScheduler
  participant Inventory
  Player->>PlushieCommand: Select character and outfit
  PlushieCommand->>ProvinceSystemClient: Fetch wardrobe slot skin asynchronously
  ProvinceSystemClient-->>PlushieCommand: Return outfit data
  PlushieCommand->>BukkitScheduler: Schedule main-thread delivery
  BukkitScheduler->>PlushieCommand: Run player and session checks
  PlushieCommand->>Inventory: Add player-head plushie when checks pass
Loading
Merge Risk: ⚪ Minimal · up to b4bce

No actionable issue remains on the available evidence. Deploy ProvinceSystem #259 first and complete the planned live-server validation.

- [ ] 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.

@ryanbarlow97
ryanbarlow97 merged commit dafa539 into main Oct 17, 2026
3 checks passed
@ryanbarlow97
ryanbarlow97 deleted the feat/wardrobe-head-command branch October 17, 2026 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant