mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +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
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "2.0.21"
|
||||
kotlin("jvm") version "2.1.0"
|
||||
java
|
||||
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`
|
||||
signing
|
||||
id("cn.lalaki.central").version("1.2.5")
|
||||
// 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"
|
||||
|
|
@ -37,17 +37,17 @@ dependencies {
|
|||
compileOnly(files("libs/EnchantsSquared.jar"))
|
||||
|
||||
// EcoEnchants
|
||||
compileOnly("com.willfp:EcoEnchants:12.5.1")
|
||||
compileOnly("com.willfp:eco:6.70.1")
|
||||
compileOnly("com.willfp:EcoEnchants:12.11.1")
|
||||
compileOnly("com.willfp:eco:6.74.5")
|
||||
compileOnly(project(":impl:LegacyEcoEnchant"))
|
||||
|
||||
// ExcellentEnchants
|
||||
compileOnly(files("libs/nightcore-2.6.4.jar"))
|
||||
compileOnly(files("libs/ExcellentEnchants-4.2.2.jar"))
|
||||
compileOnly(files("libs/nightcore-2.7.3.jar"))
|
||||
compileOnly(files("libs/ExcellentEnchants-4.3.1.jar"))
|
||||
compileOnly(files("libs/ExcellentEnchants 4.1.0-striped.jar")) // For legacy excellent enchants
|
||||
|
||||
// Disenchantment
|
||||
compileOnly("cz.kominekjan:Disenchantment:v5.4.0")
|
||||
compileOnly(files("libs/Disenchantment-6.1.0.jar"))
|
||||
|
||||
// HavenBags
|
||||
compileOnly(files("libs/HavenBags-1.30.1.1729.jar"))
|
||||
|
|
@ -72,7 +72,7 @@ dependencies {
|
|||
implementation(kotlin("stdlib"))
|
||||
|
||||
// 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")
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ tasks {
|
|||
filesMatching("plugin.yml") {
|
||||
expand(
|
||||
"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,27 +163,34 @@ tasks {
|
|||
}
|
||||
|
||||
// Offline jar (include kotlin std in the final jar fine)
|
||||
val offlineJar by creating(ShadowJar::class) {
|
||||
archiveClassifier.set("offline")
|
||||
|
||||
// Shadow necessary dependency
|
||||
relocate("com.github.stefvanschie.inventoryframework", "xyz.alexcrea.inventoryframework")
|
||||
|
||||
filesMatching("plugin.yml") {
|
||||
expand(
|
||||
"version" to "${project.version}-offline",
|
||||
"libraries" to ""
|
||||
)
|
||||
}
|
||||
val offlineJar by // Shadow necessary dependency
|
||||
registering(
|
||||
|
||||
// Include all project other dependencies
|
||||
from(project.configurations.runtimeClasspath)
|
||||
ShadowJar
|
||||
|
||||
// Add custom anvil compiled
|
||||
from(sourceSets.main.get().output)
|
||||
::class, fun ShadowJar.() {
|
||||
archiveClassifier.set("offline")
|
||||
|
||||
dependsOn(processResources)
|
||||
}
|
||||
// Shadow necessary dependency
|
||||
relocate("com.github.stefvanschie.inventoryframework", "xyz.alexcrea.inventoryframework")
|
||||
|
||||
filesMatching("plugin.yml") {
|
||||
expand(
|
||||
"version" to "${project.version}-offline",
|
||||
"libraries" to ""
|
||||
)
|
||||
}
|
||||
|
||||
// Include all project other dependencies
|
||||
from(project.configurations.runtimeClasspath)
|
||||
|
||||
// Add custom anvil compiled
|
||||
from(sourceSets.main.get().output)
|
||||
|
||||
dependsOn(processResources)
|
||||
})
|
||||
|
||||
// Make the online and offline jar on build
|
||||
named("build") {
|
||||
|
|
@ -197,12 +204,12 @@ val sourcesJar by tasks.registering(Jar::class) {
|
|||
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
|
||||
description = "Assembles Javadoc JAR"
|
||||
archiveClassifier.set("javadoc")
|
||||
from(tasks.named("dokkaHtml"))
|
||||
}
|
||||
})
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ group = rootProject.group
|
|||
version = rootProject.version
|
||||
|
||||
plugins {
|
||||
kotlin("jvm") version "2.0.21"
|
||||
kotlin("jvm") version "2.1.0"
|
||||
}
|
||||
|
||||
// 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"
|
||||
|
||||
// for Disenchantment dependency
|
||||
sourceControl {
|
||||
gitRepository(URI.create("https://github.com/H7KZ/Disenchantment.git")) {
|
||||
producesModule("cz.kominekjan:Disenchantment")
|
||||
}
|
||||
}
|
||||
|
||||
// NMS subproject
|
||||
include("nms:nms-common")
|
||||
findProject(":nms:nms-common")?.name = "nms-common"
|
||||
|
|
@ -38,5 +29,6 @@ include("nms:v1_21R2")
|
|||
findProject(":nms:v1_21R2")?.name = "v1_21R2"
|
||||
include("nms:v1_21R3")
|
||||
findProject(":nms:v1_21R3")?.name = "v1_21R3"
|
||||
|
||||
include(":impl:LegacyEcoEnchant")
|
||||
findProject(":impl:LegacyEcoEnchant")?.name = "LegacyEcoEnchant"
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package xyz.alexcrea.cuanvil.dependency
|
||||
|
||||
import cz.kominekjan.disenchantment.events.DisenchantClickEvent
|
||||
import cz.kominekjan.disenchantment.events.DisenchantEvent
|
||||
import cz.kominekjan.disenchantment.events.ShatterClickEvent
|
||||
import cz.kominekjan.disenchantment.events.ShatterEvent
|
||||
import com.jankominek.disenchantment.events.DisenchantClickEvent
|
||||
import com.jankominek.disenchantment.events.DisenchantEvent
|
||||
import com.jankominek.disenchantment.events.ShatterClickEvent
|
||||
import com.jankominek.disenchantment.events.ShatterEvent
|
||||
import io.delilaheve.CustomAnvil
|
||||
import org.bukkit.entity.HumanEntity
|
||||
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.PrepareAnvilEvent
|
||||
import org.bukkit.inventory.AnvilInventory
|
||||
import org.bukkit.inventory.ItemStack
|
||||
import org.bukkit.plugin.RegisteredListener
|
||||
import valorless.havenbags.BagSkin
|
||||
import valorless.havenbags.BagUpgrade
|
||||
import valorless.havenbags.HavenBags
|
||||
import valorless.havenbags.prevention.EquipPrevention
|
||||
import xyz.alexcrea.cuanvil.listener.PrepareAnvilListener
|
||||
import xyz.alexcrea.cuanvil.util.AnvilXpUtil
|
||||
|
||||
|
|
@ -77,16 +75,10 @@ class HavenBagsDependency {
|
|||
CustomAnvil.log("Detected anvil click haven bag bypass.")
|
||||
bagUpgrade.onInventoryClick(event)
|
||||
bagSkin.onInventoryClick(event)
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
|
||||
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