diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-04-29 11:11:40 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-04-29 11:11:40 +1000 |
commit | f2f00bdaf83738740f004b46126ffe48e0b1cbc9 (patch) | |
tree | c791b3480b026dc690107d0d56b4e7aa89897a5f /src/Java/gtPlusPlus/core/util | |
parent | 68319c278dddd993540b0aabdec5177e20e9bd51 (diff) | |
download | GT5-Unofficial-f2f00bdaf83738740f004b46126ffe48e0b1cbc9.tar.gz GT5-Unofficial-f2f00bdaf83738740f004b46126ffe48e0b1cbc9.tar.bz2 GT5-Unofficial-f2f00bdaf83738740f004b46126ffe48e0b1cbc9.zip |
$ Fixed Powder Barrel not being set correctly in .08.
$ Fixed issue with string comparisons.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/Utils.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/util/Utils.java b/src/Java/gtPlusPlus/core/util/Utils.java index 919d2f13f3..bb1d9064e8 100644 --- a/src/Java/gtPlusPlus/core/util/Utils.java +++ b/src/Java/gtPlusPlus/core/util/Utils.java @@ -932,13 +932,15 @@ public class Utils { ItemList[] aListValues = ItemList.class.getEnumConstants(); for (ItemList aItem : aListValues) { if (aItem != null) { - if (aItem.name().toLowerCase().equals(string)) { + if (aItem.name().equals(string) || aItem.name().toLowerCase().equals(string.toLowerCase())) { return aItem; } } } Logger.INFO("Tried to obtain '"+string+"' from the GT ItemList, however it does not exist."); - Logger.INFO("Using fallback option instead - "+aOther.name()); + if (aOther != null) { + Logger.INFO("Using fallback option instead - "+aOther.name()); + } return aOther; } |