Skip to content

Commit

Permalink
feat: ブロック破壊時、「マナ切れ」かどうか判定する処理を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroma6666 committed Sep 15, 2024
1 parent 9f45f42 commit e7c7cd3
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import com.github.unchama.seichiassist.seichiskill.SeichiSkillUsageMode.{Active,
import com.github.unchama.seichiassist.subsystems.breakcount.domain.CardinalDirection
import com.github.unchama.seichiassist.subsystems.breakcount.domain.level.SeichiExpAmount
import com.github.unchama.seichiassist.subsystems.breakskilltargetconfig.domain.BreakSkillTargetConfigKey
import com.github.unchama.seichiassist.subsystems.breakskilltriggerconfig.domain.BreakSkillTriggerConfigKey
import com.github.unchama.targetedeffect.player.ActionBarMessageEffect
import com.github.unchama.util.bukkit.ItemStackUtil
import com.github.unchama.util.external.{ExternalPlugins, WorldGuardWrapper}
Expand Down Expand Up @@ -174,6 +175,27 @@ object BreakUtil {
canBreakBlockMadeFromQuartz
}

/**
* ブロック破壊時、「マナ切れ」かどうか判定する。
* @param player マナ切れブロック破壊停止設定を取得するプレイヤー
*/
def isBreakBlockManaFullyConsumed(
player: Player,
): Boolean = {

val isBreakBlockManaFullyConsumed = SeichiAssist
.instance
.breakSkillTriggerConfigSystem
.api
.breakSkillTriggerConfig(player, BreakSkillTriggerConfigKey.ManaFullyConsumed)
.unsafeRunSync()

if(isBreakBlockManaFullyConsumed){
ActionBarMessageEffect(s"${RED}マナ切れでブロック破壊を止めるスキルは有効化されています").run(player).unsafeRunSync()
}
isBreakBlockManaFullyConsumed
}

private def equalsIgnoreNameCaseWorld(name: String): Boolean = {
val world = ManagedWorld.fromName(name).getOrElse(return false)

Expand Down

0 comments on commit e7c7cd3

Please sign in to comment.