Hello! I am creating a TNTRun type game where I am trying to implement a system to automatically break the blocks you are standing on if you stand still for too long. For this so far I have tried to just use the cords to attempt to get all blocks a player is standing on but it seems long and not very efficient. So what I am asking is, how would I get all the blocks a player is standing on? I don't mean the one block directly below the player, I mean like the blocks a player is technically standing on. For example, if there is four blocks placed, you could stand in the middle of those four and any 3 could be destroyed and you would still be standing. If you were between two blocks and one was destroyed, you would still be standing. So yeah, how would I get all blocks a player is standing on? I have and will continue my clunky way but someone has had to have come up with a good solution before me. Thanks, HeyAwesomePeople
Thanks for the suggestions, but I don't want to remove 4-6 blocks when I could remove just 2(standing on two blocks). I think I found a way https://bukkit.org/threads/get-blocks-under-player-feet.168727/
You could just do player.getLocation().getBlock().getRelative(BlockFace.DOWN) then from that block, check his location x and z to see which 2x2 blocks to select and remove.