From 3a373688c876ebaa48ec5d072707d9ba94f63a28 Mon Sep 17 00:00:00 2001 From: Daniel Scherf Date: Wed, 17 Jul 2024 19:52:51 +0200 Subject: [PATCH] Generate plugin.yml dynamically --- build.gradle.kts | 38 +++++++++++++++++++++++++---------- src/main/resources/plugin.yml | 21 ------------------- 2 files changed, 27 insertions(+), 32 deletions(-) delete mode 100644 src/main/resources/plugin.yml diff --git a/build.gradle.kts b/build.gradle.kts index cb51b0bca..545e156c8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,11 +2,12 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "8.1.1" + id("net.minecrell.plugin-yml.bukkit") version "0.6.0" } group = "com.iridium" version = "4.1.0" -description = "IridiumSkyblock" +description = "Skyblock Redefined" repositories { mavenCentral() @@ -37,6 +38,31 @@ dependencies { annotationProcessor("org.projectlombok:lombok:1.18.34") } +bukkit { + main = "com.iridium.iridiumskyblock.IridiumSkyblock" + apiVersion = "1.13" + author = "Peaches_MLG" + + loadBefore = listOf("Multiverse-Core") + depend = listOf("Vault") + softDepend = listOf( + "MVdWPlaceholderAPI", + "PlaceholderAPI", + "Essentials", + "EssentialsSpawn", + "RoseStacker", + "WorldEdit", + "ObsidianStacker" + ) + + commands { + register("iridiumskyblock") { + description = "Main plugin command" + aliases = listOf("is", "island") + } + } +} + tasks { // "Replace" the build task with the shadowJar task (probably bad but who cares) jar { @@ -66,16 +92,6 @@ tasks { options.encoding = "UTF-8" } - // Process Placeholders for the plugin.yml - processResources { - filesMatching("**/plugin.yml") { - expand(rootProject.project.properties) - } - - // Always re-run this task - outputs.upToDateWhen { false } - } - compileJava { sourceCompatibility = JavaVersion.VERSION_1_8.toString() targetCompatibility = JavaVersion.VERSION_1_8.toString() diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 7ca14cebe..000000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: IridiumSkyblock -version: ${version} -description: Skyblock Redefined -main: com.iridium.iridiumskyblock.IridiumSkyblock -api-version: '1.13' -author: Peaches_MLG -depend: [ Vault ] -softdepend: - - "MVdWPlaceholderAPI" - - "PlaceholderAPI" - - "Essentials" - - "EssentialsSpawn" - - "RoseStacker" - - "WorldEdit" - - "ObsidianStacker" -loadbefore: - - "Multiverse-Core" -commands: - iridiumskyblock: - aliases: [ "island", is ] - description: Main plugin command