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

make use of the intergration manager

This commit is contained in:
Jeffrey 2023-09-04 10:28:52 +02:00
parent 6d70544bb7
commit e032437b71
No known key found for this signature in database
GPG Key ID: 90F6887F79A113A3

View File

@ -84,7 +84,7 @@ public class ExplosiveTool extends SimpleSlimefunItem<ToolUseHandler> implements
if (!blockExplodeEvent.isCancelled()) {
for (Block block : blockExplodeEvent.blockList()) {
if (canBreak(p, block)) {
if (CustomBlock.byAlreadyPlaced(block) != null) {
if (Slimefun.getIntegrations().isCustomBlock(block)) {
drops.addAll(CustomBlock.byAlreadyPlaced(block).getLoot());
CustomBlock.remove(block.getLocation());
}
@ -95,7 +95,7 @@ public class ExplosiveTool extends SimpleSlimefunItem<ToolUseHandler> implements
} else {
for (Block block : blocks) {
if (canBreak(p, block)) {
if (CustomBlock.byAlreadyPlaced(block) != null) {
if (Slimefun.getIntegrations().isCustomBlock(block)) {
drops.addAll(CustomBlock.byAlreadyPlaced(block).getLoot());
CustomBlock.remove(block.getLocation());
}