diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt b/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt index ee3f3ba..2f26747 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt @@ -19,6 +19,7 @@ import org.bukkit.event.block.Action import org.bukkit.event.player.PlayerInteractEvent import org.bukkit.inventory.ItemStack import org.bukkit.persistence.PersistentDataType +import org.bukkit.event.block.BlockPlaceEvent class MinionPlaceListener : Listener { @@ -125,4 +126,11 @@ class MinionPlaceListener : Listener { ) } } + @EventHandler + fun onBlockPlace(event: BlockPlaceEvent) { + val blockLocation = event.block.location + if (AxMinionsPlugin.dataHandler.isMinion(blockLocation)) { + event.isCancelled = true + } + } } \ No newline at end of file