Skip to content

Commit

Permalink
fix: スキルが有効でないときにもチェスト等が破壊できない不具合を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Dec 26, 2023
1 parent cba4f7b commit 2e7a972
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ class PlayerBlockBreakListener(

if (!player.getWorld.isSeichiSkillAllowed) return

// 破壊不可能ブロックの時処理を終了
if (!BreakUtil.canBreakWithSkill(player, block)) {
event.setCancelled(true)
return
}

// 実際に使用するツール
val tool: BreakTool = MaterialSets
.refineItemStack(player.getInventory.getItemInMainHand, MaterialSets.breakToolMaterials)
Expand Down Expand Up @@ -120,6 +114,12 @@ class PlayerBlockBreakListener(
return
)

// 破壊不可能ブロックの時処理を終了
if (!BreakUtil.canBreakWithSkill(player, block)) {
event.setCancelled(true)
return
}

if (!selectedSkill.range.isInstanceOf[MultiArea] || skillState.usageMode == Disabled) return

event.setCancelled(true)
Expand Down

0 comments on commit 2e7a972

Please sign in to comment.