mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-27 21:26:29 +01:00
Use default sheep color if null, fixes #1205
This commit is contained in:
parent
8b90109bdc
commit
0559cf4a2d
@ -1008,7 +1008,8 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
ChatColor color = e2.getValue() < e.getValue() == false ? ChatColor.GREEN : ChatColor.GRAY;
|
||||
String message = color + Lang.get(quester.getPlayer(), "shearSheep")
|
||||
+ color + ": " + e2.getValue() + "/" + e.getValue();
|
||||
message = message.replace("<color>", e.getKey().name().toLowerCase());
|
||||
message = message.replace("<color>",
|
||||
MiscUtil.getPrettyDyeColorName(MiscUtil.getProperDyeColor(e.getKey().name())));
|
||||
quester.getPlayer().sendMessage(message);
|
||||
}
|
||||
}
|
||||
@ -2591,6 +2592,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
List<Integer> shearAmounts = config.getIntegerList("quests." + questKey + ".stages.ordered."
|
||||
+ stageNum + ".sheep-amounts");
|
||||
for (String color : sheep) {
|
||||
if (color.equalsIgnoreCase("NULL")) {
|
||||
color = "WHITE";
|
||||
}
|
||||
DyeColor dc = MiscUtil.getProperDyeColor(color);
|
||||
try {
|
||||
if (dc == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user