How much lag would a constant repeating task cause?

Discussion in 'Spigot Plugin Development' started by Drtro, May 17, 2015.

  1. I'm making a plugin where I'm sending the player's client a block change for chests to the type of block that's underneath them. Currently, I'm just testing different stuff trying to see what updates the block so I can rerun the sendBlockChange under that event. It's becoming very cumbersome. Would it be much lag if I ran a constant repeating task doing the sendBlockChange to all players?
  2. It depends. How many chests are you changing? How fast does the tast repeat? Do you mean server lag or client lag?
  3. Would likely be client lag? I'm making a plugin that turns chests with a certain name invisible, by using sendBlockChange. But it seems a lot of things updates blocks. Is there a link to all of the events that update a block?
  4. You know, you could always use ProtocolLib to listen for outgoing block change packets and cancel them if you need to, eliminating the need for a repeating task.
    • Informative Informative x 1
  5. Any tutorials?