Skip to content

Commit 7ff178d

Browse files
authored
fix: get block *below* the player
fixes issue w/ calculating block location
1 parent 81a734b commit 7ff178d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/dev/themeinerlp/attollo/listener/AttolloListener.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class AttolloListener(private val attollo: Attollo) : Listener {
2929
private fun handleElevator(player: Player, up: Boolean = false) {
3030
if (!player.hasPermission(USE_PERMISSION)) return
3131

32-
val location = player.location
32+
val location = player.location.subtract(0.0, 1.0, 0.0)
3333
val block = location.block
3434

3535
if (block.type != attollo.elevatorBlock) return
@@ -57,4 +57,4 @@ class AttolloListener(private val attollo: Attollo) : Listener {
5757
player.teleportAsync(modifiedLocation)
5858
}
5959

60-
}
60+
}

0 commit comments

Comments
 (0)