- [FEAT] New APIs for Maintenance Mode and rewrite commands system

- [FEAT] Improved config system to fix old loading bugs and support JSON
- [FEAT] LuckPerms support for commands
This commit is contained in:
2024-08-10 15:17:10 +02:00
parent e14ac2a136
commit 614fb0bc49
352 changed files with 6045 additions and 1798 deletions

View File

@@ -2,7 +2,6 @@ package com.hypherionmc.craterlib;
import com.hypherionmc.craterlib.client.gui.config.CraterConfigScreen;
import com.hypherionmc.craterlib.core.config.ConfigController;
import com.hypherionmc.craterlib.core.config.ModuleConfig;
import com.hypherionmc.craterlib.core.config.annotations.NoConfigScreen;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
@@ -19,9 +18,9 @@ public class CraterLibModMenuIntegration implements ModMenuApi {
public Map<String, ConfigScreenFactory<?>> getProvidedConfigScreenFactories() {
Map<String, ConfigScreenFactory<?>> configScreens = new HashMap<>();
ConfigController.getMonitoredConfigs().forEach((conf, watcher) -> {
ConfigController.getWatchedConfigs().forEach((conf, watcher) -> {
if (!conf.getClass().isAnnotationPresent(NoConfigScreen.class)) {
configScreens.put(((ModuleConfig) conf).getModId(), screen -> new CraterConfigScreen((ModuleConfig) conf, screen));
configScreens.put(watcher.getLeft().getModId(), screen -> new CraterConfigScreen(watcher.getLeft(), screen));
}
});