How to update a block for player

Discussion in 'Spigot Plugin Development' started by victor2748, May 16, 2015.

  1. Hello, I just sent a fake block to a player via sendBlockUpdate() (or an NMS packet), and I am looking for a way to update it back, so the player will see the actual block in that place. What is the best way to update a block for a player?
     
  2. Would player#sendBlockChange() not suit? Or am I misreading your question?
     
    • Agree Agree x 1
  3. sendBlockChange sends a fake block to a player, but I would want to update the block for the player, to the one that actually exists in that world, on that spot. getting that block's Meterial and Data, and sending it via sendBlockChange would be good in most cases, but what if that actual block has a custom BlockState (like fo example a spawner that spawns creepers). sendBlockChange would not work.