Skip to content

Commit

Permalink
Revert "Fix trigger-other-plugins"
Browse files Browse the repository at this point in the history
  • Loading branch information
NCBPFluffyBear authored Sep 29, 2023
1 parent 2cc13b3 commit f9c3caf
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 f9c3caf

Please sign in to comment.