refactor: reorganize packages and replace LPSchematic with WorldEdit

Restructure core modules into subpackages (generator, schematic, config, session, etc.); add .schem/.nbt schematic pipeline, commands, adaptive stats skeleton, and bootstrap wiring.
This commit is contained in:
loki5512344 2026-06-01 14:02:48 +02:00
parent 6ba6e5137d
commit fd0ba2cc0e
203 changed files with 5652 additions and 2367 deletions

View file

@ -0,0 +1,31 @@
package dev.loki.loparkour.schematic.config;
import dev.loki.loparkour.config.core.Config;
import dev.loki.loparkour.schematic.core.SchematicManager;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
import java.io.IOException;
/**
* Writes entries to {@code schematics/schematics.yml} and reloads {@link Config#SCHEMATICS}.
*/
public final class SchematicDifficultyConfig {
private SchematicDifficultyConfig() {
}
public static void setDifficulty(@NotNull String fileStem, double difficulty) throws IOException {
if (Config.SCHEMATICS.path == null) {
throw new IOException("Schematics config path is not initialized");
}
YamlConfiguration yaml = YamlConfiguration.loadConfiguration(Config.SCHEMATICS.path);
String key = SchematicManager.configKey(fileStem);
yaml.set("difficulty." + key, difficulty);
yaml.save(Config.SCHEMATICS.path);
Config.SCHEMATICS.fileConfiguration = YamlConfiguration.loadConfiguration(Config.SCHEMATICS.path);
Config.SCHEMATICS.load();
}
}