Skip to content

Text Formatting

Steaf23 edited this page Jul 9, 2024 · 3 revisions

Bingo Reloaded provides a few ways to format text when for example changing the scoreboard text or when making a translation.

Below are all types of formatting available. This formatting style is supported for translation files, scoreboard lines in scoreboards.yml and placeholder formats in placeholders.yml

More information on translations can be found here!

Basics

  • Colored or modified text can be created using either & or §. They can both be used in the same line if you wanted.
  • To display an actual ampersand sign (&), you have to escape the symbol by typing it twice, e.g. "A && B" will be formatted to "A & B".

Arguments

  • Numbered:
    Appears in translations and placeholders.yml.
    Example: Team {0} completed {1} at {2}! -> Team Orange completed 1x Dirt at 00:12!
    • Numbered arguments have a set order which when changed can appear differently, which is useful for translations to keep sentences grammatically correct.
      • If the above example was written as Team {2} completed {0} at {1}, it will be formatted as Team 00:12 completed Orange at 1x Dirt...
    • They are always explained next to the line in which they are required, so you know when to use which number.
    • You can add as many arguments as you wanted, or leave out certain arguments, while adding new numbers that arent specified will remove them from the text.
      • Rewriting the above example like Team {0} {0} completed a task ({3}) at {2} would be formatted as Team Orange Orange completed a task () at 00:12.
  • Named:
    Appears in scoreboards.yml
    Example: Kit: {kit} -> Kit: Overpowered
    • The meaning of each argument will be described near where it's used.
    • Arguments can be used however many times you want to put it inside the text.

Placeholders

  • Placeholders from PlaceholderAPI can just be written out normally e.g. %bingoreloaded_team_name% will be changed into Orange (if you joined the orange team) by PlaceholderAPI.

  • Placholders can contain anything except arguments which means it's possible to declare other formatting found in this document to the given text.

Extra Elements

  • {#} Hexadecimal Colors:
    Example: {#bd84d5}This is a light purple color!!
    • Aside from the default notation using & or §, hexadecimal colors can be used more efficiently using the argument modifier # followed by a 6 characters specifying the color.
  • {@} Small capital letters:
    Example: {@I am written in small caps}, and I am written in normal letters
    • Minecraft's default font provides small capital letters, if you have never seen them, give it a try!
  • {$ } Translation paths:
    Example: {$game.item.completed(Pink,1x Emerald,12:23)} -> Team Pink completed 1x Emerald at 12:23
    • the given text after the $ needs to match an existing translation key in the configured translation. If this translation requires arguments, they can be added with the brackets as shown in the example.
    • Used primarily outside of the translation file, like in scoreboards.yml to set the title of the scoreboard.
    • Can be used inside of the translation file as well, but be careful to not create cyclic references like defining game.timer.duration: "{$game.timer.time_left} followed by game.timer.time_left: "{$game.timer.duration}" will not work and the plugin will send a warning if it could be detected.

Tip

If you don't know how to use certain elements or want more examples, take a look at the translation files or the other configuration files.
Feel free to experiment!

Clone this wiki locally