Skip to content

Commit

Permalink
[publish] beta 33
Browse files Browse the repository at this point in the history
  • Loading branch information
FxRayHughes committed Oct 13, 2023
1 parent 2d4e670 commit 4c00ee7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 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.0-beta-30")
taboo("ink.ptms:um:1.0.0-beta-33")
```
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
group=ink.ptms.um
version=1.0.0-beta-32
taboolib_version=6.0.12-13
version=1.0.0-beta-33
taboolib_version=6.0.12-26
9 changes: 9 additions & 0 deletions project/common/src/main/kotlin/ink/ptms/um/Mythic.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package ink.ptms.um

import org.bukkit.Location
import org.bukkit.entity.Entity
import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Player
import org.bukkit.inventory.ItemStack

interface Mythic {
Expand Down Expand Up @@ -46,6 +48,13 @@ interface Mythic {
*/
fun getSkillMechanic(skillLine: String): Skill?

/**
* 获取玩家的目标
*
* @param player 玩家
*/
fun getTargetedEntity(player: Player): LivingEntity

/**
* 释放技能
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import io.lumine.xikage.mythicmobs.items.ItemManager
import io.lumine.xikage.mythicmobs.mobs.MobManager
import io.lumine.xikage.mythicmobs.skills.SkillManager
import io.lumine.xikage.mythicmobs.skills.SkillTrigger
import io.lumine.xikage.mythicmobs.util.MythicUtil
import org.bukkit.Location
import org.bukkit.entity.Entity
import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Player
import org.bukkit.inventory.ItemStack
import taboolib.common.LifeCycle
import taboolib.common.platform.Awake
Expand All @@ -35,6 +38,10 @@ internal class Mythic4 : Mythic {

override val isLegacy = true

override fun getTargetedEntity(player: Player): LivingEntity {
return MythicUtil.getTargetedEntity(player)
}

override fun getItem(name: String): ink.ptms.um.Item? {
return Item(itemManager.getItem(name)?.get() ?: return null)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ import io.lumine.mythic.api.skills.SkillTrigger
import io.lumine.mythic.bukkit.MythicBukkit
import io.lumine.mythic.core.config.MythicLineConfigImpl
import io.lumine.mythic.core.mobs.MobExecutor
import io.lumine.mythic.core.utils.MythicUtil
import org.bukkit.Location
import org.bukkit.entity.Entity
import org.bukkit.entity.LivingEntity
import org.bukkit.entity.Player
import org.bukkit.inventory.ItemStack
import taboolib.common.LifeCycle
import taboolib.common.platform.Awake
Expand Down Expand Up @@ -72,6 +75,10 @@ internal class Mythic5 : Mythic {
return Skill5(api.skillManager.getMechanic(MythicLineConfigImpl.unparseBlock(skillLine)) ?: return null)
}

override fun getTargetedEntity(player: Player): LivingEntity {
return MythicUtil.getTargetedEntity(player)
}

override fun castSkill(
caster: Entity,
skillName: String,
Expand Down

0 comments on commit 4c00ee7

Please sign in to comment.