Skip to content

Commit

Permalink
Fix sheep-dying exception, fixes #428
Browse files Browse the repository at this point in the history
Seriously, test things you commit!
  • Loading branch information
mcmonkey4eva committed Sep 23, 2013
1 parent e139d15 commit dcc2b9c
Showing 1 changed file with 8 additions and 2 deletions.
Expand Up @@ -2436,8 +2436,14 @@ public void sheepDyeWool(SheepDyeWoolEvent event) {

if (determination.toUpperCase().startsWith("CANCELLED"))
event.setCancelled(true);
else if (DyeColor.valueOf(determination) != null)
event.setColor(DyeColor.valueOf(determination));
else if (determination.equals(determination.toUpperCase())) {
try {
event.setColor(DyeColor.valueOf(determination));
}
catch (IllegalArgumentException e) {
dB.echoError("Unknown dye color " + determination);
}
}
}

// <--[event]
Expand Down

0 comments on commit dcc2b9c

Please sign in to comment.