Player Invisibility Bug

Discussion in 'Plugin Development' started by caldabeast, Aug 25, 2012.

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

    caldabeast

    In a quite complex plugin i'm working on, i'm having an issue with players temporarily turning invisible, and I can't figure out for the life of me. Is there anything in Bukkit that could cause this, and if so, if there any fix for it?

    The line of events that occur:
    1 Player's inventory is set depending on class
    2 Potion effects are applied
    3 Wool is put on head
    4 Name color is changed (Taking this our doesn't solve the problem)
    5 Player is teleported to his/her spawn
    6 Players duke it out, one dies
    7 Player respawns, and can't see the other player.
    8 Invisible Player kills the one who can't see him
    9 Player respawns and can see the other player again
    10 goto 6

    Source if it will help:
    https://github.com/CalDaBeast/olyWar--Working-Title-/tree/master/src/com/olympuspvp/teamolympus

    I'd appreciate any help I could get. This bug is really.. odd.
     
  2. Offline

    Giant

    This is actually a known minecraft/bukkit issue. And is related to the distance that players spawn from each other. If this distance is too great, and a player teleports or walks quite fast to the other player, it will not have enough time to "see" the player. A solution to this might be to teleport the player twice, once to the position, and then to the same position again whilst he is there. The reason why this might work is that the other player would then "see" the player close to him.
     
Thread Status:
Not open for further replies.

Share This Page