[1.7.10] GameMode.SPECTATOR ?

Discussion in 'Spigot Plugin Development' started by Laiteux, Oct 26, 2016.

  1. Hi, anybody have a good complete spectator code for 1.7.10 please ?
    To set a player like in gamemode spectator on 1.10 .
    Thank you in advance and sorry for my bad English, cordially.
     
  2. impossible to allow players going through blocks
     
  3. RIP :c
     
  4. You're 3 major versions behind, pal...
     
  5. Ok, actually its possible but nobody coded that yet.
    Use ProtocolLib to modify chunk packets to contain just air.
    For each block inside the chunk packet you send a FallingBlock at the location of that particular block.

    However you need to exempt all tile blocks (blocks which have more data than id:data).
    You could also exempt blocks where players can go through always like flowers, grass, ...

    You could try to not clear light data of the chunks but i don't know if the fallingblocks are lighted correctly by the client in that case. If you clear light data there won't be any lighting.

    Set player gamemode 1 (and optionally force them having fly on - just enable it every tick)
    To counter possible hack clients designed for that principle, you also need to cancel any block related events to that player
     

Share This Page