diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/util/PlacedCrateListener.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/util/PlacedCrateListener.kt index 8d440e3..18cbf13 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/util/PlacedCrateListener.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecocrates/util/PlacedCrateListener.kt @@ -3,6 +3,7 @@ package com.willfp.ecocrates.util import com.willfp.eco.core.EcoPlugin import com.willfp.ecocrates.crate.OpenMethod import com.willfp.ecocrates.crate.placed.PlacedCrates +import org.bukkit.GameMode import org.bukkit.event.EventHandler import org.bukkit.event.Listener import org.bukkit.event.block.Action @@ -42,6 +43,11 @@ class PlacedCrateListener( return } + // Fix breaking + if (player.gameMode == GameMode.CREATIVE && player.isSneaking && event.action == Action.LEFT_CLICK_BLOCK) { + return + } + when (event.action) { Action.LEFT_CLICK_BLOCK -> crate.previewForPlayer(player) Action.RIGHT_CLICK_BLOCK -> crate.openPlaced(