mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 15:42:19 -07: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:
@@ -882,8 +882,12 @@ public class MemorySection implements ConfigurationSection {
|
|||||||
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) {
|
||||||
|
Reference in New Issue
Block a user