Get Set of Blocks relative to player when he breaks a block.

Discussion in 'Spigot Plugin Development' started by RayNightStudios, Jul 23, 2019.

  1. So I got a BlockBreakEvent and I want to get a set of blocks relative to players Location when the player breaks a block.
    for example the blocks location is 0,0,0 it would get:
    1,0,0
    1,0,1
    1,-1,1
    0,0,1
    0,-1,0
    0,-1,1

    my question is how to make it that these blocks are relative to the player no matter which direction the block is broken.

    Thanks for any help!
     
  2. Do you mean block#getRelative?
     
  3. Idk if thats it how it works? i dont know how to use that