mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
update some dependencies
This commit is contained in:
parent
3b8010ff4d
commit
dcb12b888e
10 changed files with 43 additions and 52 deletions
|
|
@ -3,16 +3,16 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "2.0.21"
|
kotlin("jvm") version "2.1.0"
|
||||||
java
|
java
|
||||||
id("org.jetbrains.dokka").version("1.9.20")
|
id("org.jetbrains.dokka").version("1.9.20")
|
||||||
id("com.gradleup.shadow").version("8.3.3")
|
id("com.gradleup.shadow").version("8.3.5")
|
||||||
// Maven publish
|
// Maven publish
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
signing
|
signing
|
||||||
id("cn.lalaki.central").version("1.2.5")
|
id("cn.lalaki.central").version("1.2.5")
|
||||||
// Paper
|
// Paper
|
||||||
id("io.papermc.paperweight.userdev") version "2.0.0-beta.8" apply false
|
id("io.papermc.paperweight.userdev") version "2.0.0-beta.14" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "xyz.alexcrea"
|
group = "xyz.alexcrea"
|
||||||
|
|
@ -37,17 +37,17 @@ dependencies {
|
||||||
compileOnly(files("libs/EnchantsSquared.jar"))
|
compileOnly(files("libs/EnchantsSquared.jar"))
|
||||||
|
|
||||||
// EcoEnchants
|
// EcoEnchants
|
||||||
compileOnly("com.willfp:EcoEnchants:12.5.1")
|
compileOnly("com.willfp:EcoEnchants:12.11.1")
|
||||||
compileOnly("com.willfp:eco:6.70.1")
|
compileOnly("com.willfp:eco:6.74.5")
|
||||||
compileOnly(project(":impl:LegacyEcoEnchant"))
|
compileOnly(project(":impl:LegacyEcoEnchant"))
|
||||||
|
|
||||||
// ExcellentEnchants
|
// ExcellentEnchants
|
||||||
compileOnly(files("libs/nightcore-2.6.4.jar"))
|
compileOnly(files("libs/nightcore-2.7.3.jar"))
|
||||||
compileOnly(files("libs/ExcellentEnchants-4.2.2.jar"))
|
compileOnly(files("libs/ExcellentEnchants-4.3.1.jar"))
|
||||||
compileOnly(files("libs/ExcellentEnchants 4.1.0-striped.jar")) // For legacy excellent enchants
|
compileOnly(files("libs/ExcellentEnchants 4.1.0-striped.jar")) // For legacy excellent enchants
|
||||||
|
|
||||||
// Disenchantment
|
// Disenchantment
|
||||||
compileOnly("cz.kominekjan:Disenchantment:v5.4.0")
|
compileOnly(files("libs/Disenchantment-6.1.0.jar"))
|
||||||
|
|
||||||
// HavenBags
|
// HavenBags
|
||||||
compileOnly(files("libs/HavenBags-1.30.1.1729.jar"))
|
compileOnly(files("libs/HavenBags-1.30.1.1729.jar"))
|
||||||
|
|
@ -72,7 +72,7 @@ dependencies {
|
||||||
implementation(kotlin("stdlib"))
|
implementation(kotlin("stdlib"))
|
||||||
|
|
||||||
// Test dependency
|
// Test dependency
|
||||||
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.9.3") //lower bound: 4.9.2 upper bound: 4.9.3
|
testImplementation("org.mockbukkit.mockbukkit:mockbukkit-v1.21:4.21.0")
|
||||||
testRuntimeOnly("commons-lang:commons-lang:2.6")
|
testRuntimeOnly("commons-lang:commons-lang:2.6")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,7 +154,7 @@ tasks {
|
||||||
filesMatching("plugin.yml") {
|
filesMatching("plugin.yml") {
|
||||||
expand(
|
expand(
|
||||||
"version" to project.version,
|
"version" to project.version,
|
||||||
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.0.21\" "
|
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" "
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,7 +163,14 @@ tasks {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Offline jar (include kotlin std in the final jar fine)
|
// Offline jar (include kotlin std in the final jar fine)
|
||||||
val offlineJar by creating(ShadowJar::class) {
|
val offlineJar by // Shadow necessary dependency
|
||||||
|
registering(
|
||||||
|
|
||||||
|
// Include all project other dependencies
|
||||||
|
ShadowJar
|
||||||
|
|
||||||
|
// Add custom anvil compiled
|
||||||
|
::class, fun ShadowJar.() {
|
||||||
archiveClassifier.set("offline")
|
archiveClassifier.set("offline")
|
||||||
|
|
||||||
// Shadow necessary dependency
|
// Shadow necessary dependency
|
||||||
|
|
@ -183,7 +190,7 @@ tasks {
|
||||||
from(sourceSets.main.get().output)
|
from(sourceSets.main.get().output)
|
||||||
|
|
||||||
dependsOn(processResources)
|
dependsOn(processResources)
|
||||||
}
|
})
|
||||||
|
|
||||||
// Make the online and offline jar on build
|
// Make the online and offline jar on build
|
||||||
named("build") {
|
named("build") {
|
||||||
|
|
@ -197,12 +204,12 @@ val sourcesJar by tasks.registering(Jar::class) {
|
||||||
from(kotlin.sourceSets.main.get().kotlin)
|
from(kotlin.sourceSets.main.get().kotlin)
|
||||||
}
|
}
|
||||||
|
|
||||||
val javadocJar by tasks.creating(Jar::class) {
|
val javadocJar by tasks.registering(Jar::class, fun Jar.() {
|
||||||
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
group = JavaBasePlugin.DOCUMENTATION_GROUP
|
||||||
description = "Assembles Javadoc JAR"
|
description = "Assembles Javadoc JAR"
|
||||||
archiveClassifier.set("javadoc")
|
archiveClassifier.set("javadoc")
|
||||||
from(tasks.named("dokkaHtml"))
|
from(tasks.named("dokkaHtml"))
|
||||||
}
|
})
|
||||||
|
|
||||||
signing {
|
signing {
|
||||||
useGpgCmd()
|
useGpgCmd()
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ group = rootProject.group
|
||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
kotlin("jvm") version "2.0.21"
|
kotlin("jvm") version "2.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Imitate needed class and method to support legacy version of EcoEnchant
|
// Imitate needed class and method to support legacy version of EcoEnchant
|
||||||
|
|
|
||||||
BIN
libs/Disenchantment-6.1.0.jar
Normal file
BIN
libs/Disenchantment-6.1.0.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
libs/nightcore-2.7.3.jar
Normal file
BIN
libs/nightcore-2.7.3.jar
Normal file
Binary file not shown.
|
|
@ -1,14 +1,5 @@
|
||||||
import java.net.URI
|
|
||||||
|
|
||||||
rootProject.name = "CustomAnvil"
|
rootProject.name = "CustomAnvil"
|
||||||
|
|
||||||
// for Disenchantment dependency
|
|
||||||
sourceControl {
|
|
||||||
gitRepository(URI.create("https://github.com/H7KZ/Disenchantment.git")) {
|
|
||||||
producesModule("cz.kominekjan:Disenchantment")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// NMS subproject
|
// NMS subproject
|
||||||
include("nms:nms-common")
|
include("nms:nms-common")
|
||||||
findProject(":nms:nms-common")?.name = "nms-common"
|
findProject(":nms:nms-common")?.name = "nms-common"
|
||||||
|
|
@ -38,5 +29,6 @@ include("nms:v1_21R2")
|
||||||
findProject(":nms:v1_21R2")?.name = "v1_21R2"
|
findProject(":nms:v1_21R2")?.name = "v1_21R2"
|
||||||
include("nms:v1_21R3")
|
include("nms:v1_21R3")
|
||||||
findProject(":nms:v1_21R3")?.name = "v1_21R3"
|
findProject(":nms:v1_21R3")?.name = "v1_21R3"
|
||||||
|
|
||||||
include(":impl:LegacyEcoEnchant")
|
include(":impl:LegacyEcoEnchant")
|
||||||
findProject(":impl:LegacyEcoEnchant")?.name = "LegacyEcoEnchant"
|
findProject(":impl:LegacyEcoEnchant")?.name = "LegacyEcoEnchant"
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package xyz.alexcrea.cuanvil.dependency
|
package xyz.alexcrea.cuanvil.dependency
|
||||||
|
|
||||||
import cz.kominekjan.disenchantment.events.DisenchantClickEvent
|
import com.jankominek.disenchantment.events.DisenchantClickEvent
|
||||||
import cz.kominekjan.disenchantment.events.DisenchantEvent
|
import com.jankominek.disenchantment.events.DisenchantEvent
|
||||||
import cz.kominekjan.disenchantment.events.ShatterClickEvent
|
import com.jankominek.disenchantment.events.ShatterClickEvent
|
||||||
import cz.kominekjan.disenchantment.events.ShatterEvent
|
import com.jankominek.disenchantment.events.ShatterEvent
|
||||||
import io.delilaheve.CustomAnvil
|
import io.delilaheve.CustomAnvil
|
||||||
import org.bukkit.entity.HumanEntity
|
import org.bukkit.entity.HumanEntity
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent
|
import org.bukkit.event.inventory.InventoryClickEvent
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,10 @@ import org.bukkit.entity.HumanEntity
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent
|
import org.bukkit.event.inventory.InventoryClickEvent
|
||||||
import org.bukkit.event.inventory.PrepareAnvilEvent
|
import org.bukkit.event.inventory.PrepareAnvilEvent
|
||||||
import org.bukkit.inventory.AnvilInventory
|
import org.bukkit.inventory.AnvilInventory
|
||||||
import org.bukkit.inventory.ItemStack
|
|
||||||
import org.bukkit.plugin.RegisteredListener
|
import org.bukkit.plugin.RegisteredListener
|
||||||
import valorless.havenbags.BagSkin
|
import valorless.havenbags.BagSkin
|
||||||
import valorless.havenbags.BagUpgrade
|
import valorless.havenbags.BagUpgrade
|
||||||
import valorless.havenbags.HavenBags
|
import valorless.havenbags.HavenBags
|
||||||
import valorless.havenbags.prevention.EquipPrevention
|
|
||||||
import xyz.alexcrea.cuanvil.listener.PrepareAnvilListener
|
import xyz.alexcrea.cuanvil.listener.PrepareAnvilListener
|
||||||
import xyz.alexcrea.cuanvil.util.AnvilXpUtil
|
import xyz.alexcrea.cuanvil.util.AnvilXpUtil
|
||||||
|
|
||||||
|
|
@ -77,16 +75,10 @@ class HavenBagsDependency {
|
||||||
CustomAnvil.log("Detected anvil click haven bag bypass.")
|
CustomAnvil.log("Detected anvil click haven bag bypass.")
|
||||||
bagUpgrade.onInventoryClick(event)
|
bagUpgrade.onInventoryClick(event)
|
||||||
bagSkin.onInventoryClick(event)
|
bagSkin.onInventoryClick(event)
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun testAnvilInventoryChange(inventory: AnvilInventory, previous: ItemStack?): Boolean {
|
|
||||||
val currentResult = inventory.getItem(PrepareAnvilListener.ANVIL_OUTPUT_SLOT)
|
|
||||||
|
|
||||||
return currentResult == previous
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue