diff --git a/src/main/kotlin/com/mineinabyss/bonfire/components/BonfireRemoved.kt b/src/main/kotlin/com/mineinabyss/bonfire/components/BonfireRemoved.kt index 6a3183b..1dc8e25 100644 --- a/src/main/kotlin/com/mineinabyss/bonfire/components/BonfireRemoved.kt +++ b/src/main/kotlin/com/mineinabyss/bonfire/components/BonfireRemoved.kt @@ -1,3 +1,7 @@ package com.mineinabyss.bonfire.components +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable @SerialName("bonfire:bonfire_removed") class BonfireRemoved diff --git a/src/main/kotlin/com/mineinabyss/bonfire/listeners/BonfireListener.kt b/src/main/kotlin/com/mineinabyss/bonfire/listeners/BonfireListener.kt index b39fa67..e18bfaf 100644 --- a/src/main/kotlin/com/mineinabyss/bonfire/listeners/BonfireListener.kt +++ b/src/main/kotlin/com/mineinabyss/bonfire/listeners/BonfireListener.kt @@ -156,6 +156,8 @@ class BonfireListener : Listener { if (!entity.isDead) return val bonfireData = (entity as? ItemDisplay)?.toGearyOrNull()?.get() ?: return + BlockyFurnitures.removeFurniture(entity as ItemDisplay) + bonfireData.bonfirePlayers.map { it.toOfflinePlayer() }.forEach { p -> val onlinePlayer = p.player if (onlinePlayer != null) { @@ -170,7 +172,5 @@ class BonfireListener : Listener { } } } - - BlockyFurnitures.removeFurniture(entity as ItemDisplay) } }