Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
J3fftw1 committed Aug 20, 2023
1 parent 7934a09 commit 54f3530
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected boolean canBreak(@Nonnull Player p, @Nonnull Block b) {
return false;
} else if (!b.getWorld().getWorldBorder().isInside(b.getLocation())) {
return false;
} else if (CustomBlock.byAlreadyPlaced(b) == null) {
} else if (Slimefun.getIntegrations().isCustomBlock(b)) {
return false;
} else {
return Slimefun.getProtectionManager().hasPermission(p, b.getLocation(), Interaction.BREAK_BLOCK);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;

import dev.lone.itemsadder.api.CustomBlock;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Server;
Expand Down Expand Up @@ -236,7 +237,7 @@ public boolean isEventFaked(@Nonnull Event event) {
public boolean isCustomBlock(@Nonnull Block block) {
if (isItemsAdderInstalled) {
try {
return ItemsAdder.isCustomBlock(block);
return CustomBlock.byAlreadyPlaced(block) != null;
} catch (Exception | LinkageError x) {
logError("ItemsAdder", x);
}
Expand Down

0 comments on commit 54f3530

Please sign in to comment.