mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2025-12-19 15:09:23 +00:00
Merge branch 'master' into develop
This commit is contained in:
@@ -2,7 +2,7 @@ plugins {
|
||||
java
|
||||
`java-library`
|
||||
`maven-publish`
|
||||
kotlin("jvm") version "1.9.20"
|
||||
kotlin("jvm") version "2.1.0"
|
||||
id("io.github.goooler.shadow") version "8.1.7"
|
||||
id("com.willfp.libreforge-gradle-plugin") version "1.0.0"
|
||||
}
|
||||
@@ -40,7 +40,7 @@ allprojects {
|
||||
dependencies {
|
||||
compileOnly("com.willfp:eco:6.58.0")
|
||||
compileOnly("org.jetbrains:annotations:23.0.0")
|
||||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20")
|
||||
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:2.1.0")
|
||||
}
|
||||
|
||||
java {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
group = "com.willfp"
|
||||
version = rootProject.version
|
||||
|
||||
val spigotVersion = "1.21-R0.1-SNAPSHOT"
|
||||
val spigotVersion = "1.21.1-R0.1-SNAPSHOT"
|
||||
|
||||
dependencies {
|
||||
compileOnly("org.spigotmc:spigot:$spigotVersion")
|
||||
|
||||
28
eco-core/core-nms/v1_21_3/build.gradle.kts
Normal file
28
eco-core/core-nms/v1_21_3/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.3-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_3
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
28
eco-core/core-nms/v1_21_4/build.gradle.kts
Normal file
28
eco-core/core-nms/v1_21_4/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.4-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_4
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,9 +35,9 @@ class CommandTop(plugin: EcoPlugin) :
|
||||
return@runAsync
|
||||
}
|
||||
|
||||
val offset = (page - 1) * 10
|
||||
|
||||
val positions = ((offset + page)..(offset + page + 9)).toList()
|
||||
val start = (page - 1) * 10 + 1
|
||||
val end = start + 9
|
||||
val positions = (start..end).toList()
|
||||
|
||||
val top = if (skill == null) {
|
||||
positions.mapNotNull { Skills.getTop(it) }
|
||||
|
||||
@@ -24,8 +24,6 @@ object EffectAddStat : Effect<NoCompileData>("add_stat") {
|
||||
require("amount", "You must specify the amount to add/remove!")
|
||||
}
|
||||
|
||||
override val shouldReload = false
|
||||
|
||||
override fun onEnable(
|
||||
dispatcher: Dispatcher<*>,
|
||||
config: Config,
|
||||
|
||||
@@ -18,14 +18,14 @@ import com.willfp.ecoskills.api.getFormattedRequiredXP
|
||||
import com.willfp.ecoskills.api.getSkillLevel
|
||||
import com.willfp.ecoskills.api.getSkillProgress
|
||||
import com.willfp.ecoskills.api.getSkillXP
|
||||
import com.willfp.ecoskills.skills.Skill
|
||||
import org.bukkit.boss.BarColor
|
||||
import org.bukkit.boss.BarStyle
|
||||
import org.bukkit.entity.Player
|
||||
import org.bukkit.event.EventHandler
|
||||
import org.bukkit.event.EventPriority
|
||||
import org.bukkit.event.Listener
|
||||
import java.time.Duration
|
||||
import java.util.*
|
||||
import java.util.UUID
|
||||
|
||||
private val xpGainSoundEnabledKey = PersistentDataKey(
|
||||
namespacedKeyOf("ecoskills", "gain_sound_enabled"),
|
||||
@@ -61,7 +61,7 @@ class GainXPDisplay(
|
||||
)
|
||||
} else null
|
||||
|
||||
@EventHandler
|
||||
@EventHandler(priority = EventPriority.MONITOR)
|
||||
fun handle(event: PlayerSkillXPGainEvent) {
|
||||
val player = event.player
|
||||
val current = gainCache.get(playerSkill(player, event.skill)) { 0.0 }
|
||||
|
||||
@@ -147,15 +147,15 @@ xp-gain-methods:
|
||||
blocks:
|
||||
- wheat
|
||||
- carrots
|
||||
- melon
|
||||
- nether_wart
|
||||
|
||||
- trigger: mine_block
|
||||
multiplier: 4.5
|
||||
filters:
|
||||
fully_grown: true
|
||||
player_placed: false
|
||||
blocks:
|
||||
- pumpkin
|
||||
- melon
|
||||
|
||||
- trigger: mine_block
|
||||
multiplier: 5
|
||||
|
||||
@@ -112,12 +112,16 @@ xp-gain-methods:
|
||||
- jungle_log
|
||||
- acacia_log
|
||||
- dark_oak_log
|
||||
- mangrove_log
|
||||
- cherry_log
|
||||
- oak_wood
|
||||
- birch_wood
|
||||
- spruce_wood
|
||||
- jungle_wood
|
||||
- acacia_wood
|
||||
- dark_oak_wood
|
||||
- mangrove_wood
|
||||
- cherry_wood
|
||||
|
||||
- trigger: mine_block
|
||||
multiplier: 14
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#libreforge-updater
|
||||
#Fri Aug 30 17:25:28 BST 2024
|
||||
#Sat Jan 25 13:49:47 GMT 2025
|
||||
kotlin.code.style=official
|
||||
libreforge-version=4.71.5
|
||||
version=3.59.6
|
||||
kotlin.daemon.jvmargs=-Xmx2g -XX\:+UseG1GC -XX\:MaxMetaspaceSize\=512m
|
||||
libreforge-version=4.73.0
|
||||
org.gradle.parallel=true
|
||||
version=3.62.0
|
||||
|
||||
@@ -27,3 +27,5 @@ include(":eco-core:core-nms:v1_20_R1")
|
||||
include(":eco-core:core-nms:v1_20_R2")
|
||||
include(":eco-core:core-nms:v1_20_R3")
|
||||
include(":eco-core:core-nms:v1_21")
|
||||
include(":eco-core:core-nms:v1_21_3")
|
||||
include(":eco-core:core-nms:v1_21_4")
|
||||
|
||||
Reference in New Issue
Block a user