From 2b5515057a5c9a690f33ea71ab122ee7cfba6a1d Mon Sep 17 00:00:00 2001 From: Boy Date: Tue, 30 Jan 2024 16:19:26 +0100 Subject: [PATCH] refactor: make hitbox-remove packets without player unsend to all in world not all online --- .../mineinabyss/blocky/helpers/FurniturePacketHelpers.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/com/mineinabyss/blocky/helpers/FurniturePacketHelpers.kt b/src/main/kotlin/com/mineinabyss/blocky/helpers/FurniturePacketHelpers.kt index 4cdb9421..d423385c 100644 --- a/src/main/kotlin/com/mineinabyss/blocky/helpers/FurniturePacketHelpers.kt +++ b/src/main/kotlin/com/mineinabyss/blocky/helpers/FurniturePacketHelpers.kt @@ -145,7 +145,7 @@ object FurniturePacketHelpers { * @param furniture The furniture to remove the interaction hitbox of. */ fun removeInteractionHitboxPacket(furniture: ItemDisplay) { - blocky.plugin.server.onlinePlayers.forEach { player -> + furniture.world.players.forEach { player -> removeInteractionHitboxPacket(furniture, player) } interactionHitboxIdMap.removeIf { it.furnitureUUID == furniture.uniqueId } @@ -232,7 +232,7 @@ object FurniturePacketHelpers { * @param baseEntity The furniture to remove the collision hitbox of. */ fun removeCollisionHitboxPacket(baseEntity: ItemDisplay) { - blocky.plugin.server.onlinePlayers.forEach { + baseEntity.world.players.forEach { removeCollisionHitboxPacket(baseEntity, it) } collisionHitboxPosMap.remove(baseEntity.uniqueId) @@ -271,7 +271,7 @@ object FurniturePacketHelpers { * @param baseEntity The furniture to remove the light packets for */ fun removeLightPacket(baseEntity: ItemDisplay) { - blocky.plugin.server.onlinePlayers.forEach { + baseEntity.world.players.forEach { removeLightPacket(baseEntity, it) } }