0

I created a Timer for minecraft Spigot. In the Config.yml I added "&" coded for the color. But in Minecraft It looks like this:

My code looks like this:


prefix: '&6Timer &7»'

#%d% -> Tage
#%h% -> Stunden
#%m% -> Minuten
#%s% -> Sekunden
actionbar: '&7» &c&l%h%:%m%:%s%'

#Nachrichten
resume: '&aDer Timer wurde fortgesetzt'
pause: '&aDer Timer wurde pausiert'
reset: '&aDer Timer wurde zurückgesetzt'
running: '&cDer Timer läuft bereits'
not_running: '&cDer Timer läuft nicht'
paused: '&7&o» &6&oDer Timer ist pausiert'
over: '&cDie Zeit ist abgelaufen!'
remain_time: '&cEs sind noch &4%t% &cSekunden übrig'
reverse: '&aDer Timer läuft nun rückwärts'
unreverse: '&aDer Timer läuft nun vorwärts'
set: '&aDer Timer wurde auf &6%t% &agesetzt'
get: '&aZeit: &6%t%'

If you need anything else, just write me. Thanks for your help

Vinx
  • 1

3 Answers3

2

This is because & is only used in the .yml because the file cannot be written with §. You have to replace the & with §

micartey
  • 128
  • 6
1

You have to translate the ColorCodes like this

String original = "&7&o» &6&oDer Timer ist pausiert"
String translated = ChatColor.translateAlternateColorCodes('&', original);
0

Try to use § instead of &.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 23 '22 at 17:25