mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Correct sheep color formatting, fixes #1828
This commit is contained in:
parent
7b7b676b8d
commit
5c166f2041
@ -3147,14 +3147,19 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
+ stageNum + ".sheep-to-shear");
|
||||
final List<Integer> shearAmounts = config.getIntegerList("quests." + questKey
|
||||
+ ".stages.ordered." + stageNum + ".sheep-amounts");
|
||||
for (final String color : sheep) {
|
||||
for (String color : sheep) {
|
||||
DyeColor dc = null;
|
||||
if (color.equalsIgnoreCase("NULL")) {
|
||||
dc = DyeColor.WHITE;
|
||||
}
|
||||
try {
|
||||
if (dc == null) {
|
||||
dc = DyeColor.valueOf(color.toUpperCase());
|
||||
for (final DyeColor val : DyeColor.values()) {
|
||||
if (val.name().replace("_", "").equalsIgnoreCase(color.replace("_", ""))) {
|
||||
dc = val;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (final IllegalArgumentException e) {
|
||||
// Fail silently
|
||||
|
Loading…
Reference in New Issue
Block a user