fixed pixelblocks being placable in protected regions
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package eu.mhsl.minecraft.pixelblocks.utils;
|
||||
|
||||
import eu.mhsl.minecraft.pixelblocks.Main;
|
||||
import eu.mhsl.minecraft.pixelblocks.pixelblock.PixelBlock;
|
||||
import eu.mhsl.minecraft.pixelblocks.pixelblock.PixelBlockWorld;
|
||||
import org.bukkit.World;
|
||||
@@ -13,6 +14,7 @@ public class EventCanceling {
|
||||
if(!PixelBlockWorld.isPixelWorld(world)) return;
|
||||
@Nullable PixelBlock pixelBlock = PixelBlock.getPixelBlockFromBlockWorld(world);
|
||||
if(pixelBlock == null) {
|
||||
Main.logger().warning("Cancelling place event because PixelBlock could not be found: " + world.getName());
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user