@@ -29,9 +29,7 @@ import com.mineinabyss.idofront.messaging.success
2929import com.mineinabyss.idofront.nms.nbt.editOfflinePDC
3030import com.mineinabyss.idofront.nms.nbt.getOfflinePDC
3131import com.mineinabyss.idofront.plugin.Plugins
32- import com.moulberry.axiom.event.AxiomManipulateEntityEvent
3332import org.bukkit.Bukkit
34- import org.bukkit.OfflinePlayer
3533import org.bukkit.attribute.Attribute
3634import org.bukkit.entity.ItemDisplay
3735import org.bukkit.event.EventHandler
@@ -103,7 +101,7 @@ class BonfireListener : Listener {
103101 @EventHandler(priority = EventPriority .HIGHEST , ignoreCancelled = true )
104102 fun BlockyFurnitureInteractEvent.onBonfireInteract () {
105103 if (! player.isSneaking || hand != EquipmentSlot .HAND || abs(0 - player.velocity.y) < 0.001 ) return
106- if (player.fallDistance > (player.getAttribute(Attribute .GENERIC_SAFE_FALL_DISTANCE )?.value ? : 3.0 )) return
104+ if (player.fallDistance > (player.getAttribute(Attribute .SAFE_FALL_DISTANCE )?.value ? : 3.0 )) return
107105
108106 val gearyPlayer = player.toGeary()
109107 val gearyBonfire = baseEntity.toGearyOrNull() ? : return
@@ -205,29 +203,4 @@ class BonfireListener : Listener {
205203 }
206204 }
207205 }
208-
209- init {
210- if (Plugins .isEnabled(" AxiomPaper" )) {
211- Bukkit .getPluginManager().registerEvents(object : Listener {
212-
213- @EventHandler
214- fun AxiomManipulateEntityEvent.manipulateBonfire () {
215- val furniture = (entity as ? ItemDisplay ).takeUnless { entity.isDead } ? : return
216- val bonfireData = furniture.toGearyOrNull()?.get<Bonfire >() ? : return
217-
218- bonfireData.bonfirePlayers.map { it.toOfflinePlayer() to it.toPlayer() }.forEach { (offline, online) ->
219- if (online != null ) with (online.toGeary()) {
220- get<BonfireRespawn >()?.copy(bonfireLocation = entity.location)?.let { setPersisting(it) }
221- online.withGeary { encodeComponentsTo(online) }
222- } else offline.editOfflinePDC {
223- with (gearyPaper.worldManager.global) {
224- decode<BonfireRespawn >()?.copy(bonfireLocation = entity.location)?.let { encode(it) }
225- }
226- }
227- }
228- BonfirePacketHelpers .sendAddonPacket(furniture)
229- }
230- }, bonfire.plugin)
231- }
232- }
233206}
0 commit comments