diff --git a/paper-api/src/main/java/org/bukkit/configuration/MemorySection.java b/paper-api/src/main/java/org/bukkit/configuration/MemorySection.java index a2eb99df44..99c3e819c6 100644 --- a/paper-api/src/main/java/org/bukkit/configuration/MemorySection.java +++ b/paper-api/src/main/java/org/bukkit/configuration/MemorySection.java @@ -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) {