Spectator mode 1.7.10

Discussion in 'Plugin Development' started by pixelrider2000, Jul 11, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    pixelrider2000

    I'm currently working on a plugin where I wanna implement a spectator mode.
    Because "gamemode 3" doesn't exist in 1.7.10 I was wondering how I'd be able to make a spectator mode in 1.7.10 !

    To simplify my question: After a player dies I wan't them to spawn in gamemode 2, invisible (<- know how that works) and I wan't them so that they can't block hits from other players still in the game.
    So when two people fight the spectating player can't just stand in between blocking the hits.

    I know it's possible because I've seen it in other 1.7.10 plugins already.


    Thank's in advance for anyone helping me out here ;)
     
  2. Offline

    KarimAKL

    @pixelrider2000 Try using Player#hidePlayer(Player) to stop players from hitting the spectating player.
     
  3. Offline

    pixelrider2000

    Now the spectating player is not blocking sword hits (so that works) but he's still blocking arrows (entitys).
    So my question would be how I could fix that so spectating players don't block arrows anymore?

    Thanks in advance :)
     
  4. Offline

    KarimAKL

    @pixelrider2000 I found this. What the OP ended up doing should work but, you can try what @Warren1001 suggested first, if you don't like what the OP did.
     
  5. Offline

    pixelrider2000

    The solve for the problem was that he spawned a new arrow behind the spectating player, but here's the thing!
    I don't want an arrow to fly through the spectating player but instead a bullet (flansmod) should fly through! Now the problem is that I can't spawn bullets with a plugin. So is there something else I could try? But nonetheless already thanks for your help! It's appreciated :)
     
  6. Offline

    timtower Administrator Administrator Moderator

    Locked
    Modded servers are not supported by Bukkit
     
Thread Status:
Not open for further replies.

Share This Page