Cuberite Forum
How to test if the player is standing on a block? - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html)
+--- Thread: How to test if the player is standing on a block? (/thread-1936.html)



How to test if the player is standing on a block? - NathanFlurry - 05-11-2015

Hello,

I was wondering if there was a method to check and see if the player is standing on a block.

I have tried checking the block below the player to see if it is air, but that doesn't seem to work well, since the player may be half way through the air block right above the floor.

If someone could help me out with this, that'd be great.

Thanks,
Nathan


RE: How to test if the player is standing on a block? - NiLSPACE - 05-11-2015

You can use the IsOnGround function ( if (Player:IsOnGround()) then )


RE: How to test if the player is standing on a block? - NathanFlurry - 05-11-2015

(05-11-2015, 04:32 AM)NiLSPACE Wrote: You can use the IsOnGround function ( if (Player:IsOnGround()) then )

Whoops, I guess I missed that in the documentation. Thanks!