Invisible players blocking arrow

Discussion in 'Plugin Development' started by OppositeGamer, Jan 1, 2013.

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

    OppositeGamer

    How can i stop a Player from getting hit by an arrow ? This player is invisible and so there is a bug on my server where invisible players can cheating by "blocking" the arrows in the air...

    Is there a possibility to stop this ?
     
  2. Offline

    RealDope

    Arrow is launched, you store direction, velocity, etc.
    Arrow hits player, if invisible, remove arrow and spawn a new one behind the same player with same direction and velocity.

    Might look a little trippy if players look carefully, but idk lol
     
  3. Offline

    fireblast709

    No as the players are still on the server, so the server will still count it as a hit (the world, blocks, enteties, etc are managed server-side). You would have to find a way to ignore the hit and make the arrow travel past the player
     
  4. Offline

    OppositeGamer

    LOL Thats one way, just sounds rediculous, I wish Bukkit could implement some way of preventing this.

    Do you know any methods fireblast?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  5. Offline

    fireblast709

    not really. I think RealDope 's method is pretty close

    (not that you can get really closer, unless you want to remove the previous arrow, recreate the arrows path, spawning an arrow which basically is the updated version (in other words, the arrow living 1 tick in the future), and repeating this till the arrow can fly normally again)

    [offtopic] If you want to draw my attention, you can tag me. fireblast709 would do this (I would get an alert that you tagged me)
     
  6. Offline

    RainoBoy97

    On the mcpvp sabotage servers they fixed this by telelorting the invisible player that would be hit 5 blocks up.
     
Thread Status:
Not open for further replies.

Share This Page