mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI.git
synced 2024-12-30 21:07:42 +01:00
finalized config, added nullability annotations
This commit is contained in:
parent
656f9ad03c
commit
d7b947ddad
@ -21,50 +21,69 @@
|
||||
package me.clip.placeholderapi.configuration;
|
||||
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class PlaceholderAPIConfig {
|
||||
public final class PlaceholderAPIConfig
|
||||
{
|
||||
|
||||
@NotNull
|
||||
private final PlaceholderAPIPlugin plugin;
|
||||
|
||||
public PlaceholderAPIConfig(PlaceholderAPIPlugin i) {
|
||||
plugin = i;
|
||||
public PlaceholderAPIConfig(@NotNull final PlaceholderAPIPlugin plugin)
|
||||
{
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
public void loadDefConfig() {
|
||||
plugin.saveDefaultConfig();
|
||||
plugin.reloadConfig();
|
||||
}
|
||||
|
||||
public boolean checkUpdates() {
|
||||
public boolean checkUpdates()
|
||||
{
|
||||
return plugin.getConfig().getBoolean("check_updates");
|
||||
}
|
||||
|
||||
public boolean cloudAllowUnverifiedExpansions() {
|
||||
public boolean cloudAllowUnverifiedExpansions()
|
||||
{
|
||||
return plugin.getConfig().getBoolean("cloud_allow_unverified_expansions");
|
||||
}
|
||||
|
||||
public boolean isCloudEnabled() {
|
||||
|
||||
public boolean isCloudEnabled()
|
||||
{
|
||||
return plugin.getConfig().getBoolean("cloud_enabled");
|
||||
}
|
||||
|
||||
public void setCloudEnabled(boolean b) {
|
||||
plugin.getConfig().set("cloud_enabled", b);
|
||||
plugin.reloadConfig();
|
||||
public void setCloudEnabled(boolean state)
|
||||
{
|
||||
plugin.getConfig().set("cloud_enabled", state);
|
||||
plugin.saveConfig();
|
||||
}
|
||||
|
||||
public boolean isDebugMode() {
|
||||
|
||||
public boolean isDebugMode()
|
||||
{
|
||||
return plugin.getConfig().getBoolean("debug", false);
|
||||
}
|
||||
|
||||
public String booleanTrue() {
|
||||
return plugin.getConfig().getString("boolean.true");
|
||||
|
||||
@NotNull
|
||||
public String dateFormat()
|
||||
{
|
||||
//noinspection ConstantConditions (bad spigot annotation)
|
||||
return plugin.getConfig().getString("date_format", "MM/dd/yy HH:mm:ss");
|
||||
}
|
||||
|
||||
public String booleanFalse() {
|
||||
return plugin.getConfig().getString("boolean.false");
|
||||
|
||||
@NotNull
|
||||
public String booleanTrue()
|
||||
{
|
||||
//noinspection ConstantConditions (bad spigot annotation)
|
||||
return plugin.getConfig().getString("boolean.true", "true");
|
||||
}
|
||||
|
||||
public String dateFormat() {
|
||||
return plugin.getConfig().getString("date_format");
|
||||
@NotNull
|
||||
public String booleanFalse()
|
||||
{
|
||||
//noinspection ConstantConditions (bad spigot annotation)
|
||||
return plugin.getConfig().getString("boolean.false", "false");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user