diff options
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events/IsSlotProtectedEvent.kt')
-rw-r--r-- | src/main/kotlin/moe/nea/firmament/events/IsSlotProtectedEvent.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/events/IsSlotProtectedEvent.kt b/src/main/kotlin/moe/nea/firmament/events/IsSlotProtectedEvent.kt index 30fc0d8..d7cf467 100644 --- a/src/main/kotlin/moe/nea/firmament/events/IsSlotProtectedEvent.kt +++ b/src/main/kotlin/moe/nea/firmament/events/IsSlotProtectedEvent.kt @@ -28,7 +28,8 @@ data class IsSlotProtectedEvent( ) : FirmamentEvent() { companion object : FirmamentEventBus<IsSlotProtectedEvent>() { @JvmStatic - fun shouldBlockInteraction(slot: Slot): Boolean { + fun shouldBlockInteraction(slot: Slot?): Boolean { + if (slot == null) return false return publish(IsSlotProtectedEvent(slot)).isProtected.also { if (it) { MC.player?.sendMessage(Text.translatable("firmament.protectitem").append(slot.stack.name)) |