From bfaa543ecd987427c0d1f70d7623c2f51cee9047 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 21 Jun 2020 10:18:27 +0100 Subject: [PATCH] Fix NPE in ConfigurateConfigAdapter#getStringList (#2399) --- .../config/generic/adapter/ConfigurateConfigAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/me/lucko/luckperms/common/config/generic/adapter/ConfigurateConfigAdapter.java b/common/src/main/java/me/lucko/luckperms/common/config/generic/adapter/ConfigurateConfigAdapter.java index 26841d615..d43264e20 100644 --- a/common/src/main/java/me/lucko/luckperms/common/config/generic/adapter/ConfigurateConfigAdapter.java +++ b/common/src/main/java/me/lucko/luckperms/common/config/generic/adapter/ConfigurateConfigAdapter.java @@ -88,7 +88,7 @@ public abstract class ConfigurateConfigAdapter implements ConfigurationAdapter { @Override public List getStringList(String path, List def) { ConfigurationNode node = resolvePath(path); - if (node.isVirtual()) { + if (node.isVirtual() || !node.hasListChildren()) { return def; } @@ -98,7 +98,7 @@ public abstract class ConfigurateConfigAdapter implements ConfigurationAdapter { @Override public List getKeys(String path, List def) { ConfigurationNode node = resolvePath(path); - if (node.isVirtual()) { + if (node.isVirtual() || !node.hasMapChildren()) { return def; }