[Question] Prevent the client from highlighting block in line of sight.

Discussion in 'Spigot Plugin Development' started by unenergizer, May 25, 2015.

  1. Hi,

    My question today is how do servers prevent the player's client from being able to see a highlight around a block in their line of sight? For instance, Hypixel, WynnCraft, and a few other servers are able to prevent the player from seeing the highlight box that goes around a block when it is in line of sight.

    I imagine it may be done with packets. Maybe the blocks the player is looking at are sent to the client as air blocks, so the highlight/selection isn't displayed. I have done many google searches on the subject, but I haven't be able to find anything.

  2. The outline around a block when you target it? Set the player to adventure mode.
    • Informative Informative x 1
  3. Thank you!
  4. Make a custom texturepack for it, and force players to use it, using a resource pack forcer plugin, or set players gamemode to adventure, if you don't need to allow them the breaking of these blocks.