mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-02-24 23:41:29 +01:00
change config accessor materials to be non-null
This commit is contained in:
parent
b4cb706b18
commit
4fa8ed2e58
@ -106,13 +106,14 @@ public class ConfigSetting {
|
||||
|
||||
@NotNull
|
||||
public CompatibleMaterial getMaterial() {
|
||||
CompatibleMaterial val = CompatibleMaterial.getMaterial(config.getString(key));
|
||||
String val = config.getString(key);
|
||||
CompatibleMaterial mat = CompatibleMaterial.getMaterial(config.getString(key));
|
||||
|
||||
if (val == null) {
|
||||
if (mat == null) {
|
||||
System.out.println(String.format("Config value \"%s\" has an invalid material name: \"%s\"", key, val));
|
||||
}
|
||||
|
||||
return val != null ? val : CompatibleMaterial.STONE;
|
||||
return mat != null ? mat : CompatibleMaterial.STONE;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
Loading…
Reference in New Issue
Block a user