Salvage entries are no longer case sensitive

This commit is contained in:
nossr50 2019-02-06 18:00:21 -08:00
parent 5e8a840418
commit c0a3d63213
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@ Key:
- Removal - Removal
Version 2.2.0 Version 2.2.0
Salvage config entries are no longer case sensitive
Fixed a bug where Fishing was not rewarding vanilla XP orbs Fixed a bug where Fishing was not rewarding vanilla XP orbs
Version 2.1.11 Version 2.1.11

View File

@ -72,7 +72,7 @@ public class SalvageConfig extends ConfigLoader {
} }
else { else {
try { try {
salvageMaterialType = MaterialType.valueOf(salvageMaterialTypeString); salvageMaterialType = MaterialType.valueOf(salvageMaterialTypeString.replace(" ", "_").toUpperCase());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
reason.add(key + " has an invalid MaterialType of " + salvageMaterialTypeString); reason.add(key + " has an invalid MaterialType of " + salvageMaterialTypeString);
@ -106,7 +106,7 @@ public class SalvageConfig extends ConfigLoader {
} }
else { else {
try { try {
salvageItemType = ItemType.valueOf(salvageItemTypeString); salvageItemType = ItemType.valueOf(salvageItemTypeString.replace(" ", "_").toUpperCase());
} }
catch (IllegalArgumentException ex) { catch (IllegalArgumentException ex) {
reason.add(key + " has an invalid ItemType of " + salvageItemTypeString); reason.add(key + " has an invalid ItemType of " + salvageItemTypeString);