diff --git a/src/main/java/cc/fascinated/bat/features/FeatureProfile.java b/src/main/java/cc/fascinated/bat/features/FeatureProfile.java index 6b37184..aa6617f 100644 --- a/src/main/java/cc/fascinated/bat/features/FeatureProfile.java +++ b/src/main/java/cc/fascinated/bat/features/FeatureProfile.java @@ -5,6 +5,7 @@ import com.google.gson.Gson; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.NonNull; import org.bson.Document; import java.util.HashMap; @@ -25,9 +26,9 @@ public class FeatureProfile extends Serializable { * * @return the feature states */ - public FeatureState getFeatureState(Feature feature) { - if (feature == null) { - return FeatureProfile.FeatureState.DISABLED; + public FeatureState getFeatureState(@NonNull Feature feature) { + if (!feature.isCanBeDisabled()) { + return FeatureProfile.FeatureState.ENABLED; } String featureName = feature.getName().toUpperCase(); if (!this.featureStates.containsKey(featureName)) {