mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 01:06:01 +01:00
fix for BUKKIT-342 - getConfigurationSection returning the default section instead of creating a new section if defaults are present.
By: sleak <sleak@sleak-PC>
This commit is contained in:
parent
8535006335
commit
1082fbba2a
1 changed files with 7 additions and 3 deletions
|
@ -881,9 +881,13 @@ public class MemorySection implements ConfigurationSection {
|
|||
if (path == null) {
|
||||
throw new IllegalArgumentException("Path cannot be null");
|
||||
}
|
||||
|
||||
Object val = get(path, getDefault(path));
|
||||
return (val instanceof ConfigurationSection) ? (ConfigurationSection)val : null;
|
||||
|
||||
Object val = get(path, 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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue