diff --git a/api/src/main/java/com/viaversion/viafabricplus/api/settings/SettingGroup.java b/api/src/main/java/com/viaversion/viafabricplus/api/settings/SettingGroup.java index 4e6b5b5f..979656f0 100644 --- a/api/src/main/java/com/viaversion/viafabricplus/api/settings/SettingGroup.java +++ b/api/src/main/java/com/viaversion/viafabricplus/api/settings/SettingGroup.java @@ -21,6 +21,7 @@ package com.viaversion.viafabricplus.api.settings; +import com.viaversion.viafabricplus.util.ChatUtil; import net.minecraft.text.Text; import java.util.ArrayList; @@ -49,6 +50,15 @@ public class SettingGroup { return settings; } + public AbstractSetting getSetting(final String translationKey) { + for (AbstractSetting setting : settings) { + if (ChatUtil.uncoverTranslationKey(setting.getName()).equals(translationKey)) { + return setting; + } + } + return null; + } + public Text getName() { return name; }