mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-26 17:15:28 +02:00
Add support for hex color codes in locale
This commit is contained in:
@@ -106,7 +106,7 @@ public class AxesCommand extends SkillCommand {
|
||||
|
||||
@Override
|
||||
protected List<Component> getTextComponents(Player player) {
|
||||
List<Component> textComponents = new ArrayList<>();
|
||||
final List<Component> textComponents = new ArrayList<>();
|
||||
|
||||
TextComponentFactory.getSubSkillTextComponents(player, textComponents, PrimarySkillType.AXES);
|
||||
|
||||
|
@@ -31,7 +31,6 @@ import java.util.Locale;
|
||||
|
||||
public abstract class SkillCommand implements TabExecutor {
|
||||
protected PrimarySkillType skill;
|
||||
private final String skillName;
|
||||
|
||||
protected DecimalFormat percent = new DecimalFormat("##0.00%");
|
||||
protected DecimalFormat decimal = new DecimalFormat("##0.00");
|
||||
@@ -40,7 +39,6 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
|
||||
public SkillCommand(PrimarySkillType skill) {
|
||||
this.skill = skill;
|
||||
skillName = mcMMO.p.getSkillTools().getLocalizedSkillName(skill);
|
||||
skillGuideCommand = new SkillGuideCommand(skill);
|
||||
}
|
||||
|
||||
@@ -76,7 +74,8 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
permissionsCheck(player);
|
||||
dataCalculations(player, skillValue);
|
||||
|
||||
sendSkillCommandHeader(player, mcMMOPlayer, (int) skillValue);
|
||||
sendSkillCommandHeader(mcMMO.p.getSkillTools().getLocalizedSkillName(skill),
|
||||
player, mcMMOPlayer, (int) skillValue);
|
||||
|
||||
//Make JSON text components
|
||||
List<Component> subskillTextComponents = getTextComponents(player);
|
||||
@@ -139,15 +138,14 @@ public abstract class SkillCommand implements TabExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Guides.Available", skillName, skillName.toLowerCase(Locale.ENGLISH)));
|
||||
final String skillName = mcMMO.p.getSkillTools().getLocalizedSkillName(skill);
|
||||
player.sendMessage(LocaleLoader.getString("Guides.Available",
|
||||
skillName,
|
||||
skillName.toLowerCase(Locale.ENGLISH)));
|
||||
}
|
||||
|
||||
private void sendSkillCommandHeader(Player player, McMMOPlayer mcMMOPlayer, int skillValue) {
|
||||
ChatColor hd1 = ChatColor.DARK_AQUA;
|
||||
ChatColor c1 = ChatColor.GOLD;
|
||||
ChatColor c2 = ChatColor.RED;
|
||||
|
||||
|
||||
private void sendSkillCommandHeader(String skillName, Player player, McMMOPlayer mcMMOPlayer, int skillValue) {
|
||||
// send header
|
||||
player.sendMessage(LocaleLoader.getString("Skills.Overhaul.Header", skillName));
|
||||
|
||||
if(!SkillTools.isChildSkill(skill))
|
||||
|
Reference in New Issue
Block a user