Fix API usage for DiamondBank-OG and build script updates #12
No files matched your search
+6
-5
@@ -37,7 +37,7 @@ val commitHash =
|
||||
output.trim()
|
||||
}
|
||||
|
||||
group = "net.trueog.quests-og" // Declare bundle identifier.
|
||||
group = "net.trueog.questsOG" // Declare bundle identifier.
|
||||
|
||||
val apiVersion = "1.19" // Declare minecraft server target version.
|
||||
|
||||
@@ -75,10 +75,10 @@ dependencies {
|
||||
compileOnly("net.luckperms:api:5.5") // Import LuckPerms API.
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib") // Import Kotlin standard library.
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2") // Import Kotlin async library.
|
||||
implementation("io.lettuce:lettuce-core:6.7.1.RELEASE") // Import Lettuce API for keydb.
|
||||
implementation("io.lettuce:lettuce-core:7.2.0.RELEASE") // Import Lettuce API for keydb.
|
||||
compileOnly("com.github.Realizedd.Duels:duels-api:3.5.1") // Import Duels API (API-compatible with Duels-OG).
|
||||
compileOnlyApi(project(":libs:Utilities-OG")) // Import TrueOG Network Utilities-OG Java API (from source).
|
||||
compileOnlyApi(project(":libs:DiamondBank-OG")) {
|
||||
compileOnlyApi("net.trueog.utilities-og:Utilities-OG") // Import TrueOG Network Utilities-OG Java API (from source).
|
||||
compileOnlyApi("net.trueog.diamondbankog:DiamondBank-OG") {
|
||||
attributes { attribute(kotlinAttribute, true) }
|
||||
} // Import TrueOG network DiamondBank-OG Kotlin API (from source).
|
||||
}
|
||||
@@ -91,9 +91,10 @@ tasks.withType<AbstractArchiveTask>().configureEach { // Ensure reproducible .ja
|
||||
|
||||
/* ----------------------------- Shadow -------------------------------- */
|
||||
tasks.shadowJar {
|
||||
exclude("io.github.miniplaceholders.*") // Exclude the MiniPlaceholders package from being shadowed.
|
||||
archiveClassifier.set("") // Use empty string instead of null.
|
||||
minimize()
|
||||
isEnableRelocation = true
|
||||
relocationPrefix = "${project.group}.shadow"
|
||||
}
|
||||
|
||||
tasks.jar { archiveClassifier.set("part") } // Applies to root jarfile only.
|
||||
|
||||
+1
-1
Submodule libs/DiamondBank-OG updated: 450ae7ac53...ab4db3d8b8.
+1
-1
Submodule libs/Utilities-OG updated: 3705eafbc3...fc93c2ed4f.
+1
-4
@@ -9,7 +9,4 @@ ProcessBuilder("sh", "bootstrap.sh").directory(rootDir).inheritIO().start().let
|
||||
file("libs")
|
||||
.listFiles()
|
||||
?.filter { it.isDirectory && !it.name.startsWith(".") }
|
||||
?.forEach { dir ->
|
||||
include(":libs:${dir.name}")
|
||||
project(":libs:${dir.name}").projectDir = dir
|
||||
}
|
||||
?.forEach { dir -> includeBuild("libs/${dir.name}") }
|
||||
@@ -138,7 +138,7 @@ class HomesFive : Quest {
|
||||
|
||||
override suspend fun consumeQuestItems(player: Player): Boolean {
|
||||
val withdrawResult =
|
||||
QuestsOG.diamondBankAPI.withdrawFromPlayer(player.uniqueId, 2500 * 9, "Homes five quest claimed", null)
|
||||
QuestsOG.diamondBankAPI.consumeFromPlayer(player.uniqueId, 2500 * 9, "Homes five quest claimed", null)
|
||||
if (withdrawResult.isFailure) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ class HomesFour : Quest {
|
||||
|
||||
override suspend fun consumeQuestItems(player: Player): Boolean {
|
||||
val withdrawResult =
|
||||
QuestsOG.diamondBankAPI.withdrawFromPlayer(player.uniqueId, 1000 * 9, "Homes four quest claimed", null)
|
||||
QuestsOG.diamondBankAPI.consumeFromPlayer(player.uniqueId, 1000 * 9, "Homes four quest claimed", null)
|
||||
if (withdrawResult.isFailure) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ class HomesSix : Quest {
|
||||
|
||||
override suspend fun consumeQuestItems(player: Player): Boolean {
|
||||
val withdrawResult =
|
||||
QuestsOG.diamondBankAPI.withdrawFromPlayer(player.uniqueId, 5000 * 9, "Homes six quest claimed", null)
|
||||
QuestsOG.diamondBankAPI.consumeFromPlayer(player.uniqueId, 5000 * 9, "Homes six quest claimed", null)
|
||||
if (withdrawResult.isFailure) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class HomesThree : Quest {
|
||||
|
||||
override suspend fun consumeQuestItems(player: Player): Boolean {
|
||||
val withdrawResult =
|
||||
QuestsOG.diamondBankAPI.withdrawFromPlayer(player.uniqueId, 250 * 9, "Homes three quest claimed", null)
|
||||
QuestsOG.diamondBankAPI.consumeFromPlayer(player.uniqueId, 250 * 9, "Homes three quest claimed", null)
|
||||
if (withdrawResult.isFailure) {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class HomesTwo : Quest {
|
||||
|
||||
override suspend fun consumeQuestItems(player: Player): Boolean {
|
||||
val withdrawResult =
|
||||
QuestsOG.diamondBankAPI.withdrawFromPlayer(player.uniqueId, 100 * 9, "Homes two quest claimed", null)
|
||||
QuestsOG.diamondBankAPI.consumeFromPlayer(player.uniqueId, 100 * 9, "Homes two quest claimed", null)
|
||||
if (withdrawResult.isFailure) {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user