mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2025-12-19 15:09:23 +00:00
Added 1.21.6 support
This commit is contained in:
28
eco-core/core-nms/v1_21_6/build.gradle.kts
Normal file
28
eco-core/core-nms/v1_21_6/build.gradle.kts
Normal file
@@ -0,0 +1,28 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
group = "com.willfp"
|
||||
version = rootProject.version
|
||||
|
||||
val spigotVersion = "1.21.6-R0.1-SNAPSHOT"
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.spigotmc:spigot:$spigotVersion")
|
||||
}
|
||||
|
||||
configurations.compileOnly {
|
||||
resolutionStrategy {
|
||||
force("org.spigotmc:spigot:$spigotVersion")
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
compileJava {
|
||||
options.release = 21
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.willfp.ecoskills.proxy.v1_21_6
|
||||
|
||||
import com.willfp.eco.core.packet.PacketEvent
|
||||
import com.willfp.ecoskills.actionbar.ActionBarCompatibilityProxy
|
||||
import com.willfp.ecoskills.actionbar.pausePersistentActionBar
|
||||
import net.minecraft.network.protocol.game.ClientboundSystemChatPacket
|
||||
|
||||
class ActionBarCompatibility : ActionBarCompatibilityProxy {
|
||||
private val ClientboundSystemChatPacket.isActionBar: Boolean
|
||||
get() = this::class.java.declaredFields
|
||||
.first { it.type == Boolean::class.java }
|
||||
.apply { isAccessible = true }
|
||||
.get(this) as Boolean
|
||||
|
||||
override fun onSend(event: PacketEvent) {
|
||||
val player = event.player
|
||||
|
||||
when (val packet = event.packet.handle) {
|
||||
is ClientboundSystemChatPacket -> if (packet.isActionBar) player.pausePersistentActionBar()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,4 +4,4 @@ kotlin.code.style=official
|
||||
kotlin.daemon.jvmargs=-Xmx2g -XX\:+UseG1GC -XX\:MaxMetaspaceSize\=512m
|
||||
libreforge-version=4.75.0
|
||||
org.gradle.parallel=true
|
||||
version=3.63.1
|
||||
version=3.63.2
|
||||
|
||||
@@ -30,3 +30,4 @@ include(":eco-core:core-nms:v1_21")
|
||||
include(":eco-core:core-nms:v1_21_3")
|
||||
include(":eco-core:core-nms:v1_21_4")
|
||||
include(":eco-core:core-nms:v1_21_5")
|
||||
include(":eco-core:core-nms:v1_21_6")
|
||||
|
||||
Reference in New Issue
Block a user