geforkt von Mirrors/Paper
fix for BUKKIT-342 - getConfigurationSection returning the default section instead of creating a new section if defaults are present.
By: sleak <sleak@sleak-PC>
Dieser Commit ist enthalten in:
Ursprung
8535006335
Commit
1082fbba2a
@ -881,9 +881,13 @@ public class MemorySection implements ConfigurationSection {
|
|||||||
if (path == null) {
|
if (path == null) {
|
||||||
throw new IllegalArgumentException("Path cannot be null");
|
throw new IllegalArgumentException("Path cannot be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
Object val = get(path, getDefault(path));
|
Object val = get(path, null);
|
||||||
return (val instanceof ConfigurationSection) ? (ConfigurationSection)val : null;
|
if (val != null)
|
||||||
|
return (val instanceof ConfigurationSection) ? (ConfigurationSection)val : null;
|
||||||
|
|
||||||
|
val = get(path, getDefault(path));
|
||||||
|
return (val instanceof ConfigurationSection) ? createSection(path) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isConfigurationSection(String path) {
|
public boolean isConfigurationSection(String path) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren