Skip to content

Commit

Permalink
Merge pull request NCBPFluffyBear#144 from NCBPFluffyBear/revert-143-…
Browse files Browse the repository at this point in the history
…master

Revert "Fix trigger-other-plugins"
  • Loading branch information
NCBPFluffyBear authored Sep 29, 2023
2 parents 2cc13b3 + f9c3caf commit ccf029b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,17 @@ private void breakBlock(Player p, ItemStack item, Block b, List<ItemStack> drops
// Don't break SF blocks
if (sfItem != null) {
return;
} else {
b.breakNaturally(item);
}

damageItem(p, item);

if (triggerOtherPlugins.getValue()) {
AlternateBreakEvent breakEvent = new AlternateBreakEvent(b, p);
Bukkit.getServer().getPluginManager().callEvent(breakEvent);
}

b.breakNaturally(item);

damageItem(p, item);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ private ToolUseHandler onBlockBreak() {
for (Block b : logs) {
if (Slimefun.getProtectionManager().hasPermission(e.getPlayer(), b,
Interaction.BREAK_BLOCK) && BlockStorage.checkID(b) == null) {
b.breakNaturally(tool);
if (triggerOtherPlugins.getValue()) {
Bukkit.getPluginManager().callEvent(new AlternateBreakEvent(b, e.getPlayer()));
}
b.breakNaturally(tool);
}
}
}
Expand Down

0 comments on commit ccf029b

Please sign in to comment.