mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-28 03:57:37 +01:00
Use default sheep color if null, part 3. Fixes #1217
This commit is contained in:
parent
47e6553103
commit
31d7d58eb0
@ -167,9 +167,12 @@ public class MiscUtil {
|
|||||||
* Gets player-friendly name from type. 'LIGHT_BLUE' becomes 'Light Blue'
|
* Gets player-friendly name from type. 'LIGHT_BLUE' becomes 'Light Blue'
|
||||||
*
|
*
|
||||||
* @param type any dye type, ideally
|
* @param type any dye type, ideally
|
||||||
* @return cleaned-up string
|
* @return cleaned-up string, or 'White' if null
|
||||||
*/
|
*/
|
||||||
public static String getPrettyDyeColorName(DyeColor color) {
|
public static String getPrettyDyeColorName(DyeColor color) {
|
||||||
|
if (color == null) {
|
||||||
|
return "White";
|
||||||
|
}
|
||||||
if (!Lang.get("COLOR_" + color.name()).equals("NULL")) {
|
if (!Lang.get("COLOR_" + color.name()).equals("NULL")) {
|
||||||
// Legacy
|
// Legacy
|
||||||
return Lang.get("COLOR_" + color.name());
|
return Lang.get("COLOR_" + color.name());
|
||||||
|
Loading…
Reference in New Issue
Block a user