mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-14 19:55:52 -07:00
SPIGOT-6830: Fix addDefaults with Configuration overrides child Sections in the defaults
By: Wolf2323 <gabrielpatrikurban@gmail.com>
This commit is contained in:
@@ -54,7 +54,11 @@ public class MemoryConfiguration extends MemorySection implements Configuration
|
||||
public void addDefaults(@NotNull Configuration defaults) {
|
||||
Validate.notNull(defaults, "Defaults may not be null");
|
||||
|
||||
addDefaults(defaults.getValues(true));
|
||||
for (String key : defaults.getKeys(true)) {
|
||||
if (!defaults.isConfigurationSection(key)) {
|
||||
addDefault(key, defaults.get(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user