You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: create plushies from character wardrobe outfits - #124
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.
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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:L100-499 effective changed lines (tests excluded in mixed PRs).
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Staff can run
/plushie grinkle 1to 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 requiresrpchar.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 verifypassed 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.