Merge pull request #454 from PlaceholderAPI/feature/add-getBoolean

Add missing getBoolean method
This commit is contained in:
PiggyPiglet 2020-12-14 08:04:49 +08:00 committed by GitHub
commit 0d1978cece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();