|
@@ -2,7 +2,6 @@ package me.lortseam.uglyscoreboardfix;
|
|
|
|
|
|
import io.github.prospector.modmenu.api.ConfigScreenFactory;
|
|
|
import io.github.prospector.modmenu.api.ModMenuApi;
|
|
|
-import lombok.Getter;
|
|
|
import me.lortseam.completeconfig.CompleteConfig;
|
|
|
import me.lortseam.completeconfig.ConfigManager;
|
|
|
import me.lortseam.completeconfig.api.ConfigCategory;
|
|
@@ -16,33 +15,29 @@ import net.minecraft.scoreboard.ScoreboardObjective;
|
|
|
public class UglyScoreboardFix implements ClientModInitializer, ConfigCategory, ModMenuApi {
|
|
|
|
|
|
private static final String MOD_ID = "uglyscoreboardfix";
|
|
|
- @Getter
|
|
|
- private static UglyScoreboardFix instance;
|
|
|
|
|
|
- @Getter
|
|
|
- private ConfigManager configManager;
|
|
|
+ private static ConfigManager configManager;
|
|
|
@ConfigEntry
|
|
|
- private Type type = Type.CONSECUTIVE_ORDER;
|
|
|
+ private static Type type = Type.CONSECUTIVE_ORDER;
|
|
|
@ConfigEntry
|
|
|
- private Hide hide = Hide.SCORES;
|
|
|
+ private static Hide hide = Hide.SCORES;
|
|
|
|
|
|
- @Override
|
|
|
- public void onInitializeClient() {
|
|
|
- instance = this;
|
|
|
- configManager = CompleteConfig.register(MOD_ID);
|
|
|
- configManager.register(this);
|
|
|
- }
|
|
|
-
|
|
|
- public Hide getHide(ScoreboardObjective objective) {
|
|
|
+ public static Hide getHide(ScoreboardObjective objective) {
|
|
|
if (!type.test(objective)) {
|
|
|
return null;
|
|
|
}
|
|
|
return hide;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onInitializeClient() {
|
|
|
+ configManager = CompleteConfig.register(MOD_ID);
|
|
|
+ configManager.register(this);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
|
|
- return parent -> UglyScoreboardFix.getInstance().getConfigManager().buildScreen(parent);
|
|
|
+ return parent -> configManager.buildScreen(parent);
|
|
|
}
|
|
|
|
|
|
}
|