diff --git a/build.gradle.kts b/build.gradle.kts index c57c3e7..f99ca1d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,141 +1,52 @@ plugins { - alias(libs.plugins.paperweight) - alias(libs.plugins.shadowJar) - alias(libs.plugins.runPaper) - alias(libs.plugins.minotaur) - alias(libs.plugins.hangar) - - `paper-plugin` + `maven-publish` + `java-library` } val buildNumber: String? = System.getenv("BUILD_NUMBER") -rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "1.6.2" +rootProject.version = if (buildNumber != null) "${libs.versions.minecraft.get()}-$buildNumber" else "1.7" -val isSnapshot = true - -val content: String = rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8) - -dependencies { - paperweight.paperDevBundle(libs.versions.paper) - - implementation(libs.vital.paper) - - compileOnly(libs.placeholderapi) - - compileOnly(libs.oraxen) - - compileOnly(libs.vault) - - compileOnly(fileTree("libs").include("*.jar")) +subprojects.filter { it.name != "api" }.forEach { + it.project.version = rootProject.version } -paperweight { - reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.REOBF_PRODUCTION -} +subprojects { + apply(plugin = "maven-publish") + apply(plugin = "java-library") -tasks { - runServer { - jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor") + group = "com.badbones69.crazyauctions" + description = "Auction off items in style." - defaultCharacterEncoding = Charsets.UTF_8.name() + repositories { + maven("https://repo.codemc.io/repository/maven-public") - downloadPlugins { - url("https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1.jar") + maven("https://repo.crazycrew.us/libraries") + maven("https://repo.crazycrew.us/releases") - url("https://ci.lucko.me/job/TinyVault/lastSuccessfulBuild/artifact/build/libs/Vault.jar") + maven("https://jitpack.io") - url("https://download.luckperms.net/1544/bukkit/loader/LuckPerms-Bukkit-5.4.131.jar") - } - - minecraftVersion(libs.versions.minecraft.get()) + mavenCentral() } - assemble { - dependsOn(reobfJar) - - doLast { - copy { - from(reobfJar.get()) - into(rootProject.projectDir.resolve("jars")) - } + java { + toolchain { + languageVersion.set(JavaLanguageVersion.of(21)) } } - shadowJar { - archiveBaseName.set(rootProject.name) - archiveClassifier.set("") - - listOf( - "com.ryderbelserion" - ).forEach { - relocate(it, "libs.$it") + tasks { + compileJava { + options.encoding = Charsets.UTF_8.name() + options.release.set(21) } - } - processResources { - inputs.properties("name" to rootProject.name) - inputs.properties("version" to project.version) - inputs.properties("group" to project.group) - inputs.properties("apiVersion" to libs.versions.minecraft.get()) - inputs.properties("description" to project.properties["description"]) - inputs.properties("authors" to project.properties["authors"]) - inputs.properties("website" to project.properties["website"]) - - filesMatching("plugin.yml") { - expand(inputs.properties) + javadoc { + options.encoding = Charsets.UTF_8.name() } - } - modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - - projectId.set(rootProject.name.lowercase()) - - versionType.set(if (isSnapshot) "beta" else "release") - - versionName.set("${rootProject.name} ${rootProject.version}") - versionNumber.set(rootProject.version as String) - - changelog.set(content) - - uploadFile.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar")) - - gameVersions.set(listOf(libs.versions.minecraft.get())) - - loaders.addAll(listOf("purpur", "paper", "folia")) - - syncBodyFrom.set(rootProject.file("README.md").readText(Charsets.UTF_8)) - - autoAddDependsOn.set(false) - detectLoaders.set(false) - } - - hangarPublish { - publications.register("plugin") { - apiKey.set(System.getenv("HANGAR_KEY")) - - id.set(rootProject.name.lowercase()) - - version.set(rootProject.version as String) - - channel.set(if (isSnapshot) "Beta" else "Release") - - changelog.set(content) - - platforms { - paper { - jar.set(rootProject.projectDir.resolve("jars/${rootProject.name}-${rootProject.version}.jar")) - - platformVersions.set(listOf(libs.versions.minecraft.get())) - - dependencies { - hangar("PlaceholderAPI") { - required = false - } - } - } - } + processResources { + filteringCharset = Charsets.UTF_8.name() } } } \ No newline at end of file diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts deleted file mode 100644 index 00935a0..0000000 --- a/buildSrc/build.gradle.kts +++ /dev/null @@ -1,11 +0,0 @@ -import com.ryderbelserion.feather.feather - -plugins { - id("com.ryderbelserion.feather-logic") version "0.0.4" - - `kotlin-dsl` -} - -dependencies { - feather("0.0.4") -} \ No newline at end of file diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts deleted file mode 100644 index 523a2cf..0000000 --- a/buildSrc/settings.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -rootProject.name = "buildSrc" - -dependencyResolutionManagement { - repositories { - maven("https://repo.crazycrew.us/releases") - - gradlePluginPortal() - - mavenCentral() - } -} - -pluginManagement { - repositories { - maven("https://repo.crazycrew.us/releases") - - gradlePluginPortal() - } -} - -plugins { - id("com.ryderbelserion.feather-settings") -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/java-plugin.gradle.kts b/buildSrc/src/main/kotlin/java-plugin.gradle.kts deleted file mode 100644 index 7f0f291..0000000 --- a/buildSrc/src/main/kotlin/java-plugin.gradle.kts +++ /dev/null @@ -1,46 +0,0 @@ -import com.ryderbelserion.feather.enums.Repository - -plugins { - id("com.ryderbelserion.feather-core") - - `maven-publish` - - `java-library` -} - -repositories { - maven("https://repo.extendedclip.com/content/repositories/placeholderapi") - - maven("https://repo.codemc.io/repository/maven-public") - - maven("https://repo.oraxen.com/releases") - - maven(Repository.CrazyCrewReleases.url) - - maven(Repository.Jitpack.url) - - flatDir { dirs("libs") } - - mavenCentral() -} - -java { - toolchain { - languageVersion.set(JavaLanguageVersion.of(21)) - } -} - -tasks { - compileJava { - options.encoding = Charsets.UTF_8.name() - options.release.set(21) - } - - javadoc { - options.encoding = Charsets.UTF_8.name() - } - - processResources { - filteringCharset = Charsets.UTF_8.name() - } -} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/paper-plugin.gradle.kts b/buildSrc/src/main/kotlin/paper-plugin.gradle.kts deleted file mode 100644 index bf7e7f1..0000000 --- a/buildSrc/src/main/kotlin/paper-plugin.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -import com.ryderbelserion.feather.enums.Repository - -plugins { - id("java-plugin") -} - -repositories { - maven("https://repo.triumphteam.dev/snapshots") - - maven("https://maven.enginehub.org/repo") - - maven(Repository.Paper.url) -} \ No newline at end of file diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 312dcc4..861baae 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,66 +1,83 @@ -[versions] -# Minecraft -paper = "1.21-R0.1-SNAPSHOT" -minecraft = "1.21" - -# Plugins -itemsadder = "3.6.3-beta-14" -headdatabaseapi = "1.3.1" -placeholderapi = "2.11.6" -decentholograms = "2.8.8" -fancyholograms = "2.2.0" -worldguard = "7.0.10" -oraxen = "1.171.0" -nbtapi = "2.13.0" -vault = "1.7.1" - -# Libraries -triumph-cmd = "2.0.0-ALPHA-10" -tirumph-gui = "3.1.7" -jetbrains = "24.1.0" -kyori = "4.17.0" -vital = "2.0.1" - -# Paper -paperweight = "1.7.1" -runPaper = "2.3.0" -hangar = "0.1.2" - -# Other -shadowJar = "8.1.7" - -# Modrinth -minotaur = "2.+" - [plugins] paperweight = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" } hangar = { id = "io.papermc.hangar-publish-plugin", version.ref = "hangar" } -shadowJar = { id = "io.github.goooler.shadow", version.ref = "shadowJar" } runPaper = { id = "xyz.jpenilla.run-paper", version.ref = "runPaper" } minotaur = { id = "com.modrinth.minotaur", version.ref = "minotaur" } +shadow = { id = "com.gradleup.shadow", version.ref = "shadow" } + +[versions] +# Paper API +paper = "1.21.1-R0.1-SNAPSHOT" +velocity = "3.3.0-SNAPSHOT" +minecraft = "1.21.1" +brigadier = "1.3.10" + +# Gradle Plugins +paperweight = "1.7.3" +runPaper = "2.3.0" +minotaur = "2.8.7" +hangar = "0.1.2" +shadow = "8.3.0" + +# Bukkit Plugins +itemsadder = "3.6.3-beta-14" +decentholograms = "2.8.8" +headdatabaseapi = "1.3.1" +placeholderapi = "2.11.6" +fancyholograms = "2.3.3" +oraxen = "1.171.0" +vault = "1.7.1" + +# Common API +jetbrains = "24.1.0" +adventure = "4.17.0" +hikari = "4.0.3" +gson = "2.10.1" +jalu = "1.4.1" + +# Vital API +vital-paper = "1.0.6" [libraries] -# Plugins +# Velocity API +velocity = { module = "com.velocitypowered:velocity-api", version.ref = "velocity" } + +# Mojang API +brigadier = { module = "com.mojang:brigadier", version.ref = "brigadier" } + +# Paper API +paper = { module = "io.papermc.paper:paper-api", version.ref = "paper" } + +# Kyori API +kyori-logger = { module = "net.kyori:adventure-text-logger-slf4j", version.ref = "adventure" } +kyori-text = { module = "net.kyori:adventure-text-minimessage", version.ref = "adventure" } +kyori-api = { module = "net.kyori:adventure-api", version.ref = "adventure" } + +# Bukkit Plugins API decent-holograms = { module = "com.github.decentsoftware-eu:decentholograms", version.ref = "decentholograms" } -fancy-holograms = { module = "de.oliver:FancyHolograms", version.ref = "fancyholograms" } - headdatabaseapi = { module = "com.arcaniax:HeadDatabase-API", version.ref = "headdatabaseapi" } -placeholderapi = { module = "me.clip:placeholderapi", version.ref = "placeholderapi" } - -vault = { module = "com.github.MilkBowl:VaultAPI", version.ref = "vault" } - itemsadder = { module = "com.github.LoneDev6:api-itemsadder", version.ref = "itemsadder" } +fancy-holograms = { module = "de.oliver:FancyHolograms", version.ref = "fancyholograms" } +placeholderapi = { module = "me.clip:placeholderapi", version.ref = "placeholderapi" } +vault = { module = "com.github.MilkBowl:VaultAPI", version.ref = "vault" } oraxen = { module = "io.th0rgal:oraxen", version.ref = "oraxen" } +cmi-api = { module = "CMI-API:CMI-API", version = "9.7.4.1" } +cmi-lib = { module = "CMILib:CMILib", version = "1.5.1.4" } -# Libraries -triumph-cmds = { module = "dev.triumphteam:triumph-cmd-bukkit", version.ref = "triumph-cmd" } -triumph-gui = { module = "dev.triumphteam:triumph-gui", version.ref = "tirumph-gui" } +# Vital API +vital-paper = { module = "com.ryderbelserion.vital:paper", version.ref = "vital-paper" } +hikari-cp = { module = "com.zaxxer:HikariCP", version.ref = "hikari" } jetbrains = { module = "org.jetbrains:annotations", version.ref = "jetbrains" } - -vital-paper = { module = "com.ryderbelserion.vital:paper", version.ref = "vital" } -vital-core = { module = "com.ryderbelserion.vital:core", version.ref = "vital" } +gson = { module = "com.google.code.gson:gson", version.ref = "gson" } +jalu = { module = "ch.jalu:configme", version.ref = "jalu" } [bundles] -holograms = ["fancy-holograms", "decent-holograms"] -triumph = ["triumph-cmds", "triumph-gui"] \ No newline at end of file +# Soft Depends +dependencies = ["decent-holograms", "fancy-holograms", "cmi-lib", "cmi-api"] + +# Shared with the git submodules +shared = ["headdatabaseapi", "placeholderapi", "oraxen", "vault"] + +# Adventure API +adventure = ["kyori-api", "kyori-text", "kyori-logger"] \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dab2a01..8fc91c8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts new file mode 100644 index 0000000..87a172d --- /dev/null +++ b/paper/build.gradle.kts @@ -0,0 +1,74 @@ +plugins { + alias(libs.plugins.runPaper) + alias(libs.plugins.shadow) +} + +repositories { + maven("https://repo.extendedclip.com/content/repositories/placeholderapi") + + maven("https://repo.papermc.io/repository/maven-public") + + maven("https://repo.triumphteam.dev/snapshots") + + maven("https://repo.fancyplugins.de/releases") + + maven("https://repo.oraxen.com/releases") + + maven("https://maven.enginehub.org/repo") +} + +dependencies { + implementation(libs.vital.paper) { + exclude("org.yaml") + } + + compileOnly(libs.bundles.shared) + + compileOnly(libs.paper) +} + +tasks { + runServer { + jvmArgs("-Dnet.kyori.ansi.colorLevel=truecolor") + + defaultCharacterEncoding = Charsets.UTF_8.name() + + minecraftVersion(libs.versions.minecraft.get()) + } + + assemble { + dependsOn(shadowJar) + + doLast { + copy { + from(shadowJar.get()) + into(rootProject.projectDir.resolve("jars")) + } + } + } + + shadowJar { + archiveBaseName.set(rootProject.name) + archiveClassifier.set("") + + listOf( + "com.ryderbelserion.vital" + ).forEach { + relocate(it, "libs.$it") + } + } + + processResources { + inputs.properties("name" to rootProject.name) + inputs.properties("version" to project.version) + inputs.properties("group" to project.group) + inputs.properties("apiVersion" to libs.versions.minecraft.get()) + inputs.properties("description" to project.properties["description"]) + inputs.properties("authors" to project.properties["authors"]) + inputs.properties("website" to project.properties["website"]) + + filesMatching("plugin.yml") { + expand(inputs.properties) + } + } +} \ No newline at end of file diff --git a/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java similarity index 92% rename from src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java rename to paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java index 1a040c8..ae439b9 100644 --- a/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/CrazyAuctions.java @@ -9,8 +9,7 @@ import com.badbones69.crazyauctions.commands.AuctionTab; import com.badbones69.crazyauctions.controllers.GuiListener; import com.badbones69.crazyauctions.controllers.MarcoListener; import com.badbones69.crazyauctions.currency.VaultSupport; -import com.ryderbelserion.vital.paper.VitalPaper; -import com.ryderbelserion.vital.paper.files.config.FileManager; +import com.ryderbelserion.vital.paper.Vital; import com.ryderbelserion.vital.paper.util.scheduler.FoliaRunnable; import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandExecutor; @@ -22,14 +21,13 @@ import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; import java.util.Base64; -public class CrazyAuctions extends JavaPlugin { +public class CrazyAuctions extends Vital { @NotNull public static CrazyAuctions get() { return JavaPlugin.getPlugin(CrazyAuctions.class); } - private FileManager fileManager; private CrazyManager crazyManager; private VaultSupport support; @@ -44,17 +42,14 @@ public class CrazyAuctions extends JavaPlugin { return; } - new VitalPaper(this).setLogging(false); - - this.fileManager = new FileManager(); - this.crazyManager = new CrazyManager(); - - this.fileManager.addFile("config.yml") + getFileManager().addFile("config.yml") .addFile("data.yml") .addFile("messages.yml") //.addFile("test-file.yml") .init(); + this.crazyManager = new CrazyManager(); + FileConfiguration configuration = Files.data.getConfiguration(); if (configuration.contains("OutOfTime/Cancelled")) { @@ -157,8 +152,4 @@ public class CrazyAuctions extends JavaPlugin { public final CrazyManager getCrazyManager() { return this.crazyManager; } - - public final FileManager getFileManager() { - return this.fileManager; - } } \ No newline at end of file diff --git a/src/main/java/com/badbones69/crazyauctions/Methods.java b/paper/src/main/java/com/badbones69/crazyauctions/Methods.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/Methods.java rename to paper/src/main/java/com/badbones69/crazyauctions/Methods.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/CrazyManager.java b/paper/src/main/java/com/badbones69/crazyauctions/api/CrazyManager.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/CrazyManager.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/CrazyManager.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java b/paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java similarity index 99% rename from src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java index d202b49..e693135 100644 --- a/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/builders/ItemBuilder.java @@ -3,7 +3,7 @@ package com.badbones69.crazyauctions.api.builders; import com.badbones69.crazyauctions.CrazyAuctions; import com.badbones69.crazyauctions.Methods; import com.badbones69.crazyauctions.api.support.SkullCreator; -import com.ryderbelserion.vital.paper.enums.Support; +import com.ryderbelserion.vital.paper.api.enums.Support; import io.th0rgal.oraxen.api.OraxenItems; import me.clip.placeholderapi.PlaceholderAPI; import org.bukkit.*; diff --git a/src/main/java/com/badbones69/crazyauctions/api/enums/Category.java b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/Category.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/enums/Category.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/enums/Category.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/enums/Files.java b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/Files.java similarity index 86% rename from src/main/java/com/badbones69/crazyauctions/api/enums/Files.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/enums/Files.java index 648d6da..6e7b5c6 100644 --- a/src/main/java/com/badbones69/crazyauctions/api/enums/Files.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/Files.java @@ -1,7 +1,7 @@ package com.badbones69.crazyauctions.api.enums; import com.badbones69.crazyauctions.CrazyAuctions; -import com.ryderbelserion.vital.paper.files.config.FileManager; +import com.ryderbelserion.vital.paper.api.files.FileManager; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.plugin.java.JavaPlugin; import org.jetbrains.annotations.NotNull; @@ -31,7 +31,7 @@ public enum Files { } public final YamlConfiguration getConfiguration() { - return this.fileManager.getFile(this.fileName); + return this.fileManager.getFile(this.fileName).getConfiguration(); } public final String getStrippedName() { @@ -47,6 +47,6 @@ public enum Files { } public void reload() { - this.fileManager.reloadFile(this.fileName); + this.fileManager.addFile(this.fileName); } } \ No newline at end of file diff --git a/src/main/java/com/badbones69/crazyauctions/api/enums/Messages.java b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/Messages.java similarity index 99% rename from src/main/java/com/badbones69/crazyauctions/api/enums/Messages.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/enums/Messages.java index 8c89aa3..56cecb8 100644 --- a/src/main/java/com/badbones69/crazyauctions/api/enums/Messages.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/Messages.java @@ -1,7 +1,7 @@ package com.badbones69.crazyauctions.api.enums; import com.badbones69.crazyauctions.Methods; -import com.ryderbelserion.vital.paper.enums.Support; +import com.ryderbelserion.vital.paper.api.enums.Support; import me.clip.placeholderapi.PlaceholderAPI; import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.FileConfiguration; diff --git a/src/main/java/com/badbones69/crazyauctions/api/enums/Reasons.java b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/Reasons.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/enums/Reasons.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/enums/Reasons.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/enums/ShopType.java b/paper/src/main/java/com/badbones69/crazyauctions/api/enums/ShopType.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/enums/ShopType.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/enums/ShopType.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/events/AuctionBuyEvent.java b/paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionBuyEvent.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/events/AuctionBuyEvent.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionBuyEvent.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/events/AuctionCancelledEvent.java b/paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionCancelledEvent.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/events/AuctionCancelledEvent.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionCancelledEvent.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/events/AuctionExpireEvent.java b/paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionExpireEvent.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/events/AuctionExpireEvent.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionExpireEvent.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/events/AuctionListEvent.java b/paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionListEvent.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/events/AuctionListEvent.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionListEvent.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/events/AuctionNewBidEvent.java b/paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionNewBidEvent.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/events/AuctionNewBidEvent.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionNewBidEvent.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/events/AuctionWinBidEvent.java b/paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionWinBidEvent.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/events/AuctionWinBidEvent.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/events/AuctionWinBidEvent.java diff --git a/src/main/java/com/badbones69/crazyauctions/api/support/MetricsWrapper.java b/paper/src/main/java/com/badbones69/crazyauctions/api/support/MetricsWrapper.java similarity index 90% rename from src/main/java/com/badbones69/crazyauctions/api/support/MetricsWrapper.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/support/MetricsWrapper.java index 28f03e3..8132ffd 100644 --- a/src/main/java/com/badbones69/crazyauctions/api/support/MetricsWrapper.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/api/support/MetricsWrapper.java @@ -1,7 +1,7 @@ package com.badbones69.crazyauctions.api.support; import com.badbones69.crazyauctions.CrazyAuctions; -import com.ryderbelserion.vital.paper.bStats; +import com.ryderbelserion.vital.paper.api.bStats; public class MetricsWrapper extends bStats { diff --git a/src/main/java/com/badbones69/crazyauctions/api/support/SkullCreator.java b/paper/src/main/java/com/badbones69/crazyauctions/api/support/SkullCreator.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/api/support/SkullCreator.java rename to paper/src/main/java/com/badbones69/crazyauctions/api/support/SkullCreator.java diff --git a/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java similarity index 99% rename from src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java rename to paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java index 8399d31..1e64c4e 100644 --- a/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java +++ b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionCommand.java @@ -9,7 +9,7 @@ import com.badbones69.crazyauctions.api.enums.Messages; import com.badbones69.crazyauctions.api.enums.ShopType; import com.badbones69.crazyauctions.api.events.AuctionListEvent; import com.badbones69.crazyauctions.controllers.GuiListener; -import com.ryderbelserion.vital.paper.files.config.FileManager; +import com.ryderbelserion.vital.paper.api.files.FileManager; import org.bukkit.Material; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; diff --git a/src/main/java/com/badbones69/crazyauctions/commands/AuctionTab.java b/paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionTab.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/commands/AuctionTab.java rename to paper/src/main/java/com/badbones69/crazyauctions/commands/AuctionTab.java diff --git a/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java b/paper/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java rename to paper/src/main/java/com/badbones69/crazyauctions/controllers/GuiListener.java diff --git a/src/main/java/com/badbones69/crazyauctions/controllers/MarcoListener.java b/paper/src/main/java/com/badbones69/crazyauctions/controllers/MarcoListener.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/controllers/MarcoListener.java rename to paper/src/main/java/com/badbones69/crazyauctions/controllers/MarcoListener.java diff --git a/src/main/java/com/badbones69/crazyauctions/currency/VaultSupport.java b/paper/src/main/java/com/badbones69/crazyauctions/currency/VaultSupport.java similarity index 100% rename from src/main/java/com/badbones69/crazyauctions/currency/VaultSupport.java rename to paper/src/main/java/com/badbones69/crazyauctions/currency/VaultSupport.java diff --git a/src/main/resources/config.yml b/paper/src/main/resources/config.yml similarity index 100% rename from src/main/resources/config.yml rename to paper/src/main/resources/config.yml diff --git a/src/main/resources/data.yml b/paper/src/main/resources/data.yml similarity index 100% rename from src/main/resources/data.yml rename to paper/src/main/resources/data.yml diff --git a/src/main/resources/messages.yml b/paper/src/main/resources/messages.yml similarity index 100% rename from src/main/resources/messages.yml rename to paper/src/main/resources/messages.yml diff --git a/src/main/resources/plugin.yml b/paper/src/main/resources/plugin.yml similarity index 100% rename from src/main/resources/plugin.yml rename to paper/src/main/resources/plugin.yml diff --git a/publish/build.gradle.kts b/publish/build.gradle.kts new file mode 100644 index 0000000..f97cb78 --- /dev/null +++ b/publish/build.gradle.kts @@ -0,0 +1,84 @@ +plugins { + alias(libs.plugins.minotaur) + alias(libs.plugins.hangar) +} + +val content: String = rootProject.file("CHANGELOG.md").readText(Charsets.UTF_8) + +val isBeta = false +val pluginName = rootProject.name +val mcVersion = libs.versions.minecraft.get() + +tasks { + modrinth { + token.set(System.getenv("MODRINTH_TOKEN")) + + projectId.set(rootProject.name) + + versionType.set(if (isBeta) "beta" else "release") + + versionName.set("$pluginName ${rootProject.version}") + versionNumber.set(rootProject.version as String) + + changelog.set(content) + + uploadFile.set(rootProject.projectDir.resolve("jars/$pluginName-${rootProject.version}.jar")) + + gameVersions.set(listOf(mcVersion)) + + loaders.addAll(listOf("purpur", "paper", "folia")) + + syncBodyFrom.set(rootProject.file("README.md").readText(Charsets.UTF_8)) + + autoAddDependsOn.set(false) + detectLoaders.set(false) + + /*dependencies { + optional.version("fancyholograms", "2.3.2") + }*/ + } + + hangarPublish { + publications.register("plugin") { + apiKey.set(System.getenv("HANGAR_KEY")) + + id.set(pluginName) + + version.set(rootProject.version as String) + + channel.set(if (isBeta) "Beta" else "Release") + + changelog.set(content) + + platforms { + paper { + jar.set(rootProject.projectDir.resolve("jars/$pluginName-${rootProject.version}.jar")) + + platformVersions.set(listOf(mcVersion)) + + dependencies { + hangar("PlaceholderAPI") { + required = false + } + + url("Oraxen", "https://www.spigotmc.org/resources/%E2%98%84%EF%B8%8F-oraxen-custom-items-blocks-emotes-furniture-resourcepack-and-gui-1-18-1-20-4.72448/") { + required = false + } + + /*hangar("FancyHolograms") { + required = false + } + + url("CMI", "https://www.spigotmc.org/resources/cmi-298-commands-insane-kits-portals-essentials-economy-mysql-sqlite-much-more.3742/") { + required = false + } + + url("DecentHolograms", "https://www.spigotmc.org/resources/decentholograms-1-8-1-20-4-papi-support-no-dependencies.96927/") { + required = false + }*/ + } + } + } + } + } +} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index ff8d418..3e26ec4 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,13 +1,3 @@ rootProject.name = "CrazyAuctions" -pluginManagement { - repositories { - maven("https://repo.crazycrew.us/releases") - - gradlePluginPortal() - } -} - -plugins { - id("com.ryderbelserion.feather-settings") version "0.0.4" -} \ No newline at end of file +include("publish" ,"paper") \ No newline at end of file