Fix #7, Crash when selecting default world type
parent
e4adcb5308
commit
b17c6846f0
|
@ -46,7 +46,7 @@ public class WorldTypes {
|
|||
|
||||
public boolean contains(String worldTypeName) {
|
||||
for(WorldType worldType: selectable_AsList) {
|
||||
if (worldType.getName() == worldTypeName) return true;
|
||||
if (worldType.getName().equals(worldTypeName)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public enum WorldType {
|
|||
private static WorldType findInstance(String nameOrValue) {
|
||||
for (WorldType worldType : values()) {
|
||||
if (worldType.name.equalsIgnoreCase(nameOrValue)
|
||||
|| worldType.symbolicFieldName.equalsIgnoreCase(nameOrValue)) {
|
||||
|| (worldType.symbolicFieldName != null && worldType.symbolicFieldName.equalsIgnoreCase(nameOrValue))) {
|
||||
return worldType;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue