diff --git a/build.gradle.kts b/build.gradle.kts index 0e420da..9b7ead4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,7 +30,8 @@ subprojects { publishing { repositories { maven { - url = uri("https://repo.tabooproject.org/repository/releases") + url = uri("http://sacredcraft.cn:8081/repository/releases") + isAllowInsecureProtocol = true credentials { username = project.findProperty("taboolibUsername").toString() password = project.findProperty("taboolibPassword").toString() diff --git a/gradle.properties b/gradle.properties index 1c7e28f..02f5c6b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ group=ink.ptms.um -version=1.1.2 +version=1.1.3 taboolib_version=6.2.0-beta33 diff --git a/project/implementation-v4/src/main/kotlin/ink/ptms/um/impl4/MobListenerSkill.kt b/project/implementation-v4/src/main/kotlin/ink/ptms/um/impl4/MobListenerSkill.kt index da53b70..ff700b3 100644 --- a/project/implementation-v4/src/main/kotlin/ink/ptms/um/impl4/MobListenerSkill.kt +++ b/project/implementation-v4/src/main/kotlin/ink/ptms/um/impl4/MobListenerSkill.kt @@ -15,19 +15,26 @@ import taboolib.common.platform.Ghost import taboolib.common.platform.event.SubscribeEvent import taboolib.common.platform.function.warning - internal object MobListenerSkill { + var isCrashed = false + @Ghost @SubscribeEvent fun onDropLoadEvent(event: MythicMechanicLoadEvent) { - val e = MobSkillLoadEvent(event.mechanicName, event.config.toUniversal()).fire() - val registerSkill = e.registerSkill ?: return - // 如果注册的技能,不在这三种类型中,那么就是无效的技能类型 - if (registerSkill !is EntityTargetSkill && registerSkill !is LocationTargetSkill && registerSkill !is NoTargetSkill) { - error("Unsupported skill: $registerSkill") + if (isCrashed) return + try { + val e = MobSkillLoadEvent(event.mechanicName, event.config.toUniversal()).fire() + val registerSkill = e.registerSkill ?: return + // 如果注册的技能,不在这三种类型中,那么就是无效的技能类型 + if (registerSkill !is EntityTargetSkill && registerSkill !is LocationTargetSkill && registerSkill !is NoTargetSkill) { + error("Unsupported skill: $registerSkill") + } + event.register(ProxySkill(registerSkill, event.mechanicName, event.config)) + } catch (ex: Throwable) { + isCrashed = true + ex.printStackTrace() } - event.register(ProxySkill(registerSkill, event.mechanicName, event.config)) } class ProxySkill(val skill: BaseSkill, name: String, mlc: MythicLineConfig) : SkillMechanic(name, mlc), ITargetedEntitySkill, ITargetedLocationSkill, INoTargetSkill {