diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..1d953f4b --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index 9d7e1518..13c19eb8 100755 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ dependency-reduced-pom.xml buildNumber.properties .mvn/timing.properties .mvn/wrapper/maven-wrapper.jar +.direnv diff --git a/plugin/.gitignore b/plugin/.gitignore new file mode 100644 index 00000000..f5bdd214 --- /dev/null +++ b/plugin/.gitignore @@ -0,0 +1 @@ +run diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index bac6959a..f647b3f8 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -5,6 +5,7 @@ plugins { alias(libs.plugins.shadow) alias(libs.plugins.pluginyml) alias(libs.plugins.hangar) + id("xyz.jpenilla.run-paper") version "2.3.0" } publishData { @@ -16,12 +17,13 @@ publishData { dependencies { implementation(project(":api")) compileOnly(libs.paper) - implementation("net.kyori:adventure-platform-bukkit:4.3.3") { + bukkitLibrary("net.kyori:adventure-platform-bukkit:4.3.3") { exclude("org.jetbrains") } compileOnly(libs.bundles.fawe) compileOnly("org.jetbrains:annotations:24.1.0") + bukkitLibrary(libs.jacksonyaml) bukkitLibrary(libs.bundles.eldoutil) } @@ -95,22 +97,23 @@ tasks { shadowJar { archiveBaseName.set("schematic-sanitizer") archiveVersion.set(publishData.getVersion()) - val mapping = mapOf( - "de.eldoria.eldoutilities" to "utils", - "de.eldoria.jacksonbukkit" to "jacksonbukkit", - "org.yaml" to "yaml", - "net.kyori" to "adventure", - "com.fasterxml.jackson" to "jackson" - ) - if (publishData.isPublicBuild()) { - println("relocating") - val base = "de.eldoria.schematicsanitizer.libs." - for ((pattern, name) in mapping) { - println("relocating ${pattern} to ${base}${name}") - relocate(pattern, "${base}${name}") - } - +// val mapping = mapOf( +// ) +// if (publishData.isPublicBuild()) { +// println("relocating") +// val base = "de.eldoria.schematicsanitizer.libs." +// for ((pattern, name) in mapping) { +// println("relocating ${pattern} to ${base}${name}") +// relocate(pattern, "${base}${name}") +// } +// } + } + runServer { + val myPlugins = runPaper.downloadPluginsSpec { + url("https://ci.athion.net/job/FastAsyncWorldEdit/lastSuccessfulBuild/artifact/artifacts/FastAsyncWorldEdit-Bukkit-2.11.2-SNAPSHOT-879.jar") } + downloadPlugins.from(myPlugins) + minecraftVersion("1.21") } } diff --git a/plugin/src/main/java/de/eldoria/schematicsanitizer/SanitizerPlugin.java b/plugin/src/main/java/de/eldoria/schematicsanitizer/SanitizerPlugin.java index 256daa8e..bdf9fe41 100644 --- a/plugin/src/main/java/de/eldoria/schematicsanitizer/SanitizerPlugin.java +++ b/plugin/src/main/java/de/eldoria/schematicsanitizer/SanitizerPlugin.java @@ -48,8 +48,9 @@ public Level getLogLevel() { @Override public void onPluginEnable() { - ILocalizer localizer = Localizer.create(this, "en_US"); - localizer.setLocale("en_US"); + ILocalizer localizer = Localizer.builder(this, "en_US") + .setIncludedLocales("en_US") + .build(); MessageSender.builder(this) .localizer(localizer) .prefix("<#009dff>[<#ff7300>SC<#009dff>]") diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..e6613cbb --- /dev/null +++ b/shell.nix @@ -0,0 +1,11 @@ +{ pkgs ? import {}, ... }: + +let +jdk = pkgs.jdk21; +gradle= pkgs.gradle.override { java = jdk; }; +in +pkgs.mkShell +{ + packages = with pkgs; [jdk gradle]; +} +