mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
Fix for BUKKIT-313 - this makes getString return a string representation of whatever object is present at the path, rather than only returning if the object is a string
By: sleak <sleak@sleak-PC>
This commit is contained in:
parent
1082fbba2a
commit
732b59ed1e
1 changed files with 2 additions and 2 deletions
|
@ -289,7 +289,7 @@ public class MemorySection implements ConfigurationSection {
|
|||
}
|
||||
|
||||
Object def = getDefault(path);
|
||||
return getString(path, (def instanceof String) ? (String)def : null);
|
||||
return getString(path, def != null ? def.toString() : null);
|
||||
}
|
||||
|
||||
public String getString(String path, String def) {
|
||||
|
@ -298,7 +298,7 @@ public class MemorySection implements ConfigurationSection {
|
|||
}
|
||||
|
||||
Object val = get(path, def);
|
||||
return (val instanceof String) ? (String)val : def;
|
||||
return (val != null) ? val.toString() : def;
|
||||
}
|
||||
|
||||
public boolean isString(String path) {
|
||||
|
|
Loading…
Reference in a new issue