diff options
author | nea <nea@nea.moe> | 2023-05-26 23:23:03 +0200 |
---|---|---|
committer | nea <nea@nea.moe> | 2023-05-26 23:23:03 +0200 |
commit | 59ea00dabceeddf01fec7bf87ec548d7beedd7cc (patch) | |
tree | 9711c61022f2bac793c423de97901d2370b7c316 /src/main/kotlin/moe/nea/firmament/events | |
parent | 484a4b1a61493eb1401ac9c8ac063db3f847cf98 (diff) | |
download | firmament-59ea00dabceeddf01fec7bf87ec548d7beedd7cc.tar.gz firmament-59ea00dabceeddf01fec7bf87ec548d7beedd7cc.tar.bz2 firmament-59ea00dabceeddf01fec7bf87ec548d7beedd7cc.zip |
Fix bug in WFixedPanel and use WScrollPanel + WBox for config
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/events')
-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)) |