Use toString() rather than cast potential Boolean, fixes #672

This commit is contained in:
BuildTools 2019-02-02 10:44:15 -05:00
parent f2d50198e1
commit a265f2b270
2 changed files with 2 additions and 2 deletions

View File

@ -570,7 +570,7 @@ public class RequirementsPrompt extends FixedSetPrompt {
for (String dataKey : datamapKeys) {
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.RESET + ChatColor.BLUE + dataKey;
if (datamap.get(dataKey) != null) {
text += ChatColor.GREEN + " (" + (String) datamap.get(dataKey) + ")\n";
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
} else {
text += ChatColor.RED + " (" + Lang.get("valRequired") + ")\n";
}

View File

@ -849,7 +849,7 @@ public class RewardsPrompt extends FixedSetPrompt {
for (String dataKey : datamapKeys) {
text += ChatColor.BOLD + "" + ChatColor.DARK_BLUE + index + " - " + ChatColor.RESET + ChatColor.BLUE + dataKey;
if (datamap.get(dataKey) != null) {
text += ChatColor.GREEN + " (" + (String) datamap.get(dataKey) + ")\n";
text += ChatColor.GREEN + " (" + datamap.get(dataKey).toString() + ")\n";
} else {
text += ChatColor.RED + " (" + Lang.get("valRequired") + ")\n";
}