1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

requested changes

This commit is contained in:
Jeffrey 2023-08-20 14:16:55 +02:00
parent 7934a09e1a
commit 54f3530658
No known key found for this signature in database
GPG Key ID: 90F6887F79A113A3
2 changed files with 3 additions and 2 deletions

View File

@ -138,7 +138,7 @@ public class ExplosiveTool extends SimpleSlimefunItem<ToolUseHandler> implements
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);

View File

@ -6,6 +6,7 @@ import java.util.logging.Level;
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;
@ -236,7 +237,7 @@ public class IntegrationsManager {
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);
}