Branding in depth
How it works (for editing menus and messages)#
- Never edit a generated file directly. Files made from templates start with a
GENERATEDcomment. Edit the file with the same path underbrand/templates/instead, then runrebrand.bat. Otherwise your change is overwritten next time. - Tokens you can use in a template:
| Token | Gives |
|---|---|
{{server.name}} | PinnaPrison (any value, by its dotted path) |
{{server.name|upper}}, |lower, |smallcaps | PINNAPRISON, pinnaprison, ᴘɪɴɴᴀᴘʀɪꜱᴏɴ |
{{c.gold}} | #D4AF37 |
{{c.gold|mm}} | <#D4AF37> (MiniMessage) |
{{c.gold|amp}} | &#D4AF37 |
{{c.gold|legacy}} | &x&D&4&A&F&3&7 |
{{c.gold|section}} | §x§D§4§A§F§3§7 |
{{c.gold|hex}}, |rgb, |int | D4AF37, 212, 175, 55, 13938487 |
{{grad:dark_gold:bright_gold}} | <gradient:#9C7A1B:#F7D774> |
{{pad:36:server.name}} | spaces that centre the name in a 36-character line |
An unknown token stops the run, so a typo never reaches the server.
Self-test#
brand/test-brand.yml is a fake brand ("Test Kingdom", blue and silver). To prove a rebrand is complete:
java -cp tools\lib\snakeyaml-2.2.jar tools\Rebrand.java --brand brand\test-brand.yml --leak PinnaPrison
java -cp tools\lib\snakeyaml-2.2.jar tools\Rebrand.javaThe first line applies the test brand and lists any visible "PinnaPrison" left; the second switches back. Plugin ids (permissions such as pinnaprison.balance.give, placeholders such as %pinnaprison_tokens%, commands) are not visible branding and are skipped.
UI themes#
themes: in brand/brand.yml lists the UI themes players can unlock (/themes). Each theme overrides seven color names (gold, bright_gold, dark_gold, navy, royal_purple, royal_blue, royal_light); the rebrand redraws its menus, HUD and pause menu into plugins/mcStyles/themes/<id>/ (images named after plugins/mcStyles/targets.yml, the rest in pack/); mcStyles turns them into Nexo multipack templates on start. Add, remove or recolor themes there; names, icons and prices are in tools/StyleGen.java (THEMES), which writes each theme.yml.
Animated text effects#
The included Animated Text FX pack animates any text drawn in one of its exact colors (#5400xx, list in the pack's README). Brand colors may never use red 54-57, so they cannot trigger an effect by accident. The setup uses effects for the animated colors in /colors, the top donor / Admin / Owner prefixes, the rank-up title and the welcome title.
Two crate effects only recolor the letters, so they also work on holograms, signs and name tags: #5400C8 Prism (flowing rainbow, the Limited Cosmetic Crate) and #5400CC Gilded (gold shine, the Cosmetic Crate). The crates also use drawn banners (plugins/Nexo/glyphs/crate_banners.yml, images in plugins/Nexo/pack/assets/pinnaprison/textures/glyph/crate/): grayscale art that the effect colors pixel by pixel. Write a banner in an effect color, for example <#5400C8><glyph:crate_limited_holo>. To change the banner text, edit BANNERS in tools/CrateFx.java and run java tools/CrateFx.java.
Rebranding in game (mcBrander)#
/brand opens the brand menu: every section of brand.yml, colors shown in their own color, switches you click on and off, text you type in chat. /brand set <key> <value>, /brand add <key> <value> (a new key), /brand check and /brand apply do the same from chat. Apply writes every config exactly like rebrand.bat, then redraws the resource pack and the cosmetics. Every apply keeps the old files: /brand backups puts them back. /brand tutorial walks through the whole setup. Op only (mcbrander.admin). Settings: plugins/mcBrander/config.yml.