9
0
mirror of https://gitlab.com/SamB440/rpgregions-2.git synced 2026-01-06 15:41:35 +00:00

Fix per-region title colours

This commit is contained in:
SamB440
2020-05-07 18:27:57 +01:00
parent b938f047c0
commit e5230f9f45

View File

@@ -10,6 +10,7 @@ import net.islandearth.rpgregions.translation.Translations;
import net.islandearth.rpgregions.utils.XMaterial;
import net.islandearth.rpgregions.utils.XSound;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.entity.Player;
@@ -221,7 +222,9 @@ public class ConfiguredRegion {
return Translations.DISCOVERED_TITLE.getList(player, customName);
}
return title;
List<String> translatedTitle = new ArrayList<>();
title.forEach(titles -> translatedTitle.add(ChatColor.translateAlternateColorCodes('&', titles)));
return translatedTitle;
}
/**
@@ -235,7 +238,9 @@ public class ConfiguredRegion {
return Translations.DISCOVERED_SUBTITLE.getList(player, customName);
}
return subtitle;
List<String> translatedSubtitle = new ArrayList<>();
subtitle.forEach(sub -> translatedSubtitle.add(ChatColor.translateAlternateColorCodes('&', sub)));
return translatedSubtitle;
}
public void save(RPGRegions plugin) throws IOException {