Skip to content

Commit

Permalink
[publish][1.1.1] 对6.2.0的更新进行补齐
Browse files Browse the repository at this point in the history
  • Loading branch information
FxRayHughes committed Oct 18, 2024
1 parent f61af61 commit 637cd33
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ taboolib{
relocate("ink.ptms.um","xx.um")
}

taboo("ink.ptms:um:1.0.8")
taboo("ink.ptms:um:1.1.1")
```
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.gradle.java")
id("org.gradle.maven-publish")
id("org.jetbrains.kotlin.jvm") version "1.8.22" apply false
id("org.jetbrains.kotlin.jvm") version "1.9.22" apply false
}

subprojects {
Expand Down Expand Up @@ -52,4 +52,4 @@ publishing {

gradle.buildFinished {
buildDir.deleteRecursively()
}
}
2 changes: 1 addition & 1 deletion project/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ dependencies {
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import ink.ptms.um.Mob
import ink.ptms.um.MobType
import io.lumine.xikage.mythicmobs.MythicMobs
import io.lumine.xikage.mythicmobs.mobs.ActiveMob
import io.lumine.xikage.mythicmobs.mobs.MythicMob
import org.bukkit.entity.Entity
import org.bukkit.entity.EntityType
import org.bukkit.entity.LivingEntity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ internal class MobConfiguration(val config: MythicConfig) : ConfigurationSection
}

override fun getConfigurationSection(path: String): ConfigurationSection? {
return root.getConfigurationSection("$name.$path")?.let { MobConfiguration(MythicConfig("$name.$path", root)) }
return root.getConfigurationSection("$name.$path")?.let {
MobConfiguration(MythicConfig("$name.$path", root))
}
}

override fun getDouble(path: String): Double {
Expand Down Expand Up @@ -219,4 +221,4 @@ internal class MobConfiguration(val config: MythicConfig) : ConfigurationSection
override fun toMap(): Map<String, Any?> {
error("Unsupported")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ internal class Mythic4 : Mythic {

val skillManager: SkillManager by unsafeLazy { api.skillManager }

internal val mmList: ConcurrentHashMap<String, MythicMob> = mobManager.getProperty<ConcurrentHashMap<String, MythicMob>>("mmList")!!
val mmList: ConcurrentHashMap<String, MythicMob> by unsafeLazy {
mobManager.getProperty<ConcurrentHashMap<String, MythicMob>>("mmList")!!
}

override val isLegacy = true

Expand Down
2 changes: 1 addition & 1 deletion project/implementation-v5/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ internal class MobConfiguration(sourceConfig: MythicConfig) : ConfigurationSecti
override fun toMap(): Map<String, Any?> {
error("Unsupported")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import taboolib.common.LifeCycle
import taboolib.common.platform.Awake
import taboolib.common.util.orNull
import taboolib.library.reflex.Reflex.Companion.getProperty
import taboolib.library.reflex.Reflex.Companion.invokeMethod
import taboolib.module.nms.getItemTag
import java.io.File
import java.util.*
Expand All @@ -40,7 +41,9 @@ internal class Mythic5 : Mythic {
val api: MythicBukkit
get() = MythicProvider.get() as MythicBukkit

val mmList: MutableMap<String, MythicMob> = api.mobManager.getProperty<MutableMap<String, MythicMob>>("mmList")!!
val mmList: MutableMap<String, MythicMob> by lazy {
api.mobManager.getProperty<MutableMap<String, MythicMob>>("mmList")!!
}

override val isLegacy = false

Expand Down Expand Up @@ -84,11 +87,13 @@ internal class Mythic5 : Mythic {
}

override fun getSkillTrigger(name: String): Skill.Trigger {
return Skill5.Trigger(SkillTrigger.get(name.uppercase()))
val invokeMethod = Class.forName(SkillTrigger::class.java.name).invokeMethod<Any>("get", name.uppercase(), isStatic = true) ?: return getDefaultSkillTrigger()
return Skill5.Trigger(invokeMethod)
}

override fun getDefaultSkillTrigger(): Skill.Trigger {
return Skill5.Trigger(SkillTrigger.get("DEFAULT"))
val invokeMethod = Class.forName(SkillTrigger::class.java.name).invokeMethod<Any>("get", "DEFAULT", isStatic = true)
return Skill5.Trigger(invokeMethod!!)
}

override fun getSkillMechanic(skillLine: String): Skill? {
Expand Down Expand Up @@ -156,4 +161,4 @@ internal class Mythic5 : Mythic {
}
}
}
}
}

0 comments on commit 637cd33

Please sign in to comment.