From 8f85ce91dab55ed42670738e4ab3b4ae8a2a1572 Mon Sep 17 00:00:00 2001 From: Liam Date: Sun, 7 Jul 2024 01:12:22 +0100 Subject: [PATCH] oopsie!!!!!!!!! --- .../java/cc/fascinated/bat/features/FeatureProfile.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)) {