Add support for color codes in boss names.

Translates color codes for the boss name string right before setting it
in the BossWave object.

Closes #610
This commit is contained in:
Nesseley
2020-04-27 11:21:05 +02:00
committed by Andreas Troelsen
parent ce9f07e6b5
commit e8cce8e620
2 changed files with 3 additions and 1 deletions
@@ -21,6 +21,7 @@ import com.garbagemule.MobArena.waves.types.SpecialWave;
import com.garbagemule.MobArena.waves.types.SupplyWave;
import com.garbagemule.MobArena.waves.types.SwarmWave;
import com.garbagemule.MobArena.waves.types.UpgradeWave;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.inventory.ItemStack;
@@ -254,7 +255,7 @@ public class WaveParser
// Check if there's a specific boss name
String bossName = config.getString("name", null);
if (bossName != null && !bossName.isEmpty()) {
result.setBossName(bossName);
result.setBossName(ChatColor.translateAlternateColorCodes('&', bossName));
}
// Grab the boss health