mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
Move FeatureFlags to new config module
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package de.oliver.fancylib.featureFlags;
|
||||
package com.fancyinnovations.config.featureflags;
|
||||
|
||||
public class FeatureFlag {
|
||||
|
||||
private final String name;
|
||||
private final String description;
|
||||
private boolean enabled;
|
||||
private final boolean forceDisabled;
|
||||
private boolean enabled;
|
||||
|
||||
public FeatureFlag(String name, String description, boolean forceDisabled) {
|
||||
this.name = name;
|
||||
@@ -15,11 +15,15 @@ public class FeatureFlag {
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
if(forceDisabled) return false;
|
||||
if (forceDisabled) return false;
|
||||
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -28,10 +32,6 @@ public class FeatureFlag {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public boolean isForceDisabled() {
|
||||
return forceDisabled;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package de.oliver.fancylib.featureFlags;
|
||||
package com.fancyinnovations.config.featureflags;
|
||||
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
Reference in New Issue
Block a user