From fb3e30c45af4e8623cd83986018b4a880c4ca9d0 Mon Sep 17 00:00:00 2001 From: tsaaafffff <160864021+tsaaaafffff@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:36:01 +0100 Subject: [PATCH] Update BukkitSoulEvents.kt Added torso offset, the soul shall spawn at the players torso not their feet --- .../soulkeeper/module/event/event/BukkitSoulEvents.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/event-bukkit/src/main/kotlin/ru/astrainteractive/soulkeeper/module/event/event/BukkitSoulEvents.kt b/modules/event-bukkit/src/main/kotlin/ru/astrainteractive/soulkeeper/module/event/event/BukkitSoulEvents.kt index 8807bff..e00b6c6 100644 --- a/modules/event-bukkit/src/main/kotlin/ru/astrainteractive/soulkeeper/module/event/event/BukkitSoulEvents.kt +++ b/modules/event-bukkit/src/main/kotlin/ru/astrainteractive/soulkeeper/module/event/event/BukkitSoulEvents.kt @@ -50,19 +50,26 @@ internal class BukkitSoulEvents( } private fun getSoulLocation(event: PlayerDeathEvent): KLocation { + // Offset Y by +1.0 so the soul spawns at the player's torso, not their feet + val torsoOffsetY = 1.0 return when { event.player.location.world.environment == World.Environment.THE_END -> { val endLocation = event.player.location.clone() if (endLocation.y < soulsConfig.endLocationLimitY) { endLocation.y = soulsConfig.endLocationLimitY } + endLocation.y += torsoOffsetY endLocation } - else -> event.player.location + else -> { + val location = event.player.location.clone() + location.y += torsoOffsetY + location + } }.asKLocation() } - + private fun getAndClearDroppedXp(event: PlayerDeathEvent): Int { return when { event.keepLevel -> 0