From ebc62c6fd248382bf52e4eff3f88cb28469093ad Mon Sep 17 00:00:00 2001 From: PiggyPiglet Date: Fri, 30 Jan 2026 22:17:11 +0800 Subject: [PATCH] Add convenience booleanValue method to PlaceholderAPI class --- build.gradle.kts | 2 +- src/main/java/at/helpch/placeholderapi/PlaceholderAPI.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index a1c6863..dac0af3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "at.helpch" -version = "1.0.2-DEV-${System.getProperty("BUILD_NUMBER")}" +version = "1.0.2" description = "An awesome placeholder provider!" diff --git a/src/main/java/at/helpch/placeholderapi/PlaceholderAPI.java b/src/main/java/at/helpch/placeholderapi/PlaceholderAPI.java index 1ddad4b..10db098 100644 --- a/src/main/java/at/helpch/placeholderapi/PlaceholderAPI.java +++ b/src/main/java/at/helpch/placeholderapi/PlaceholderAPI.java @@ -323,4 +323,8 @@ public final class PlaceholderAPI { public static boolean containsBracketPlaceholders(String text) { return text != null && BRACKET_PLACEHOLDER_PATTERN.matcher(text).find(); } + + public static String booleanValue(final boolean value) { + return value ? PlaceholderAPIPlugin.instance().configManager().config().booleanValue().trueValue() : PlaceholderAPIPlugin.instance().configManager().config().booleanValue().falseValue(); + } }