13
0
geforkt von Mirrors/Paper

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>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-12-16 09:27:54 -08:00
Ursprung 1082fbba2a
Commit 732b59ed1e

Datei anzeigen

@ -289,7 +289,7 @@ public class MemorySection implements ConfigurationSection {
} }
Object def = getDefault(path); 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) { public String getString(String path, String def) {
@ -298,7 +298,7 @@ public class MemorySection implements ConfigurationSection {
} }
Object val = get(path, def); Object val = get(path, def);
return (val instanceof String) ? (String)val : def; return (val != null) ? val.toString() : def;
} }
public boolean isString(String path) { public boolean isString(String path) {