diff --git a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala index 29edc3a824..7ce6fe6cbc 100644 --- a/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala +++ b/src/main/scala/com/github/unchama/seichiassist/util/BreakUtil.scala @@ -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} @@ -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)