Fix config string format in MobTypes.java
Replaced concatenation with String.format for clarity and consistency. This change ensures that the configuration strings are constructed correctly, preventing potential runtime errors.
This commit is contained in:
@@ -74,7 +74,7 @@ public class MobTypes extends AbstractConfig {
|
||||
config.getConfigurationSection(prefix + key + ".modifiers").getKeys(false).forEach(modifier -> {
|
||||
log.info("{}{}.modifiers.{}", prefix, key, modifier);
|
||||
log.info("5 {}", modifier);
|
||||
String attribute = config.getString(prefix + key + ".modifiers." + modifier, "attribute", null);
|
||||
String attribute = config.getString(String.format("%s%s.modifiers.%s.", prefix, key, modifier), "attribute", null);
|
||||
log.info("6");
|
||||
if (attribute == null) {
|
||||
log.info("RETURN (7)");
|
||||
|
||||
Reference in New Issue
Block a user