mirror of
https://github.com/PikaMug/Quests.git
synced 2024-07-01 00:55:13 +02: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");
|
+ stageNum + ".sheep-to-shear");
|
||||||
final List<Integer> shearAmounts = config.getIntegerList("quests." + questKey
|
final List<Integer> shearAmounts = config.getIntegerList("quests." + questKey
|
||||||
+ ".stages.ordered." + stageNum + ".sheep-amounts");
|
+ ".stages.ordered." + stageNum + ".sheep-amounts");
|
||||||
for (final String color : sheep) {
|
for (String color : sheep) {
|
||||||
DyeColor dc = null;
|
DyeColor dc = null;
|
||||||
if (color.equalsIgnoreCase("NULL")) {
|
if (color.equalsIgnoreCase("NULL")) {
|
||||||
dc = DyeColor.WHITE;
|
dc = DyeColor.WHITE;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (dc == null) {
|
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) {
|
} catch (final IllegalArgumentException e) {
|
||||||
// Fail silently
|
// Fail silently
|
||||||
|
|
Loading…
Reference in New Issue
Block a user