Add convenience booleanValue method to PlaceholderAPI class

This commit is contained in:
PiggyPiglet
2026-01-30 22:17:11 +08:00
parent a065d620cb
commit ebc62c6fd2
2 changed files with 5 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ plugins {
} }
group = "at.helpch" group = "at.helpch"
version = "1.0.2-DEV-${System.getProperty("BUILD_NUMBER")}" version = "1.0.2"
description = "An awesome placeholder provider!" description = "An awesome placeholder provider!"

View File

@@ -323,4 +323,8 @@ public final class PlaceholderAPI {
public static boolean containsBracketPlaceholders(String text) { public static boolean containsBracketPlaceholders(String text) {
return text != null && BRACKET_PLACEHOLDER_PATTERN.matcher(text).find(); 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();
}
} }