Skip to content

Commit

Permalink
Merge pull request #833 from Chronoken/main
Browse files Browse the repository at this point in the history
Rename
  • Loading branch information
Chronoken authored Jan 15, 2024
2 parents ec0af62 + 349ce1c commit 80b9618
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ public void initialize(String var) {

@OverridePriority
@EventHandler
public void onSwim(EntityInsideBlockEvent event) {
public void insideBlock(EntityInsideBlockEvent event) {
if (!isCancelStateOk(event.isCancelled())) return;
if (!(event.getEntity() instanceof LivingEntity caster) || !canTrigger(caster) || !hasSpell(caster)) return;

Block block = event.getBlock();
if (blockData != null && check(block)) return;

boolean casted = passiveSpell.activate(caster, block.getLocation().add(0.5, 0.5, 0.5));
boolean casted = passiveSpell.activate(caster, block.getLocation().toCenterLocation());
if (cancelDefaultAction(casted)) event.setCancelled(true);
}

Expand Down

0 comments on commit 80b9618

Please sign in to comment.