From fe02939466c2a9d71ff61ef45715dfb7036e0603 Mon Sep 17 00:00:00 2001 From: Andre_601 <11576465+Andre601@users.noreply.github.com> Date: Fri, 28 Aug 2020 15:16:03 +0200 Subject: [PATCH] Add missing getBoolean method --- .../clip/placeholderapi/expansion/PlaceholderExpansion.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java index 385ce4a..2021cc2 100644 --- a/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java +++ b/src/main/java/me/clip/placeholderapi/expansion/PlaceholderExpansion.java @@ -199,6 +199,12 @@ public abstract class PlaceholderExpansion extends PlaceholderHook { final ConfigurationSection section = getConfigSection(); return section == null ? Collections.emptyList() : section.getStringList(path); } + + @NotNull + public final boolean getBoolean(@NotNull final String path, final boolean def) { + final ConfigurationSection section = getConfigSection(); + return section == null ? def : section.getBoolean(path, def); + } public final boolean configurationContains(@NotNull final String path) { final ConfigurationSection section = getConfigSection();