finished code cleanup

This commit is contained in:
2024-07-24 20:21:35 +02:00
parent 93dc9d8a80
commit e8a0523b68
17 changed files with 198 additions and 180 deletions

View File

@@ -0,0 +1,17 @@
package eu.mhsl.minecraft.pixelblocks.listeners;
import eu.mhsl.minecraft.pixelblocks.utils.EventCanceling;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockFromToEvent;
public class PreventLiquidsFlowListener implements Listener {
@EventHandler
public static void onLiquidFlow(BlockFromToEvent event) {
EventCanceling.shouldCancelInPixelBlock(
event,
event.getToBlock().getWorld(),
pixelBlock -> !pixelBlock.getPixelWorld().allowPlacements(event.getToBlock().getLocation())
);
}
}