-
Notifications
You must be signed in to change notification settings - Fork 12
Text Formatting
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!
- 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"
.
-
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 asTeam 00:12 completed Orange at 1x Dirt
...
- If the above example was written as
- 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 asTeam Orange Orange completed a task () at 00:12
.
- Rewriting the above example like
- Numbered arguments have a set order which when changed can appear differently, which is useful for translations to keep sentences grammatically correct.
-
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 from PlaceholderAPI can just be written out normally e.g.
%bingoreloaded_team_name%
will be changed intoOrange
(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.
- {#} 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.
- Aside from the default notation using
- {@} 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 bygame.timer.time_left: "{$game.timer.duration}"
will not work and the plugin will send a warning if it could be detected.
- the given text after the
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!
Contact me in my discord server here (discord) for any requests, bug reports or changes you would want to see as that's where I hang out more often compared to over here. There is also a test server available where we occasionally test out experimental features.