Invisible players after teleporting

Discussion in 'Plugin Development' started by heifinator, Jul 30, 2012.

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

    heifinator

    I am aware that other people have had this problem in the past.

    Basically the plugin I am writting teleports people around some in a fairly small area (100 x 100) nothing excessive, 5 - 6 people a few times a minute.

    Every now and then a player will be invisible to others for a while (at least 10 seconds, sometimes until he relogs)

    Is there any known work around for this bug?
     
  2. Offline

    np98765

    This belongs in Plugin Development ;)
     
  3. Offline

    ZeusAllMighty11

    ? this has been in plugin development...
     
  4. Offline

    np98765

    Oh... That's weird. I thought I clicked on this from Plugin Requests... -_- Anyways, I removed the tag... Does that remove it from his alerts? :eek:
     
  5. Offline

    r0306

    heifinator
    Yeah. That happens to me too. I don't think that it's that they are invisible, its because the client did not update the data or the server did not send the teleport data packet yet. Maybe this will help:
    Code:
    @EventHandler
    public void onTeleport(PlayerTeleportEvent event)
    {
      Player player = event.getPlayer();
      for (Player p : Bukkit.getOnlinePlayers())
      {
        if (p.canSee(player))
            p.showPlayer(player);
      }
    }
     
  6. Offline

    Fl1pzta

    Has anybody confirmed that this fixes the issue?
     
  7. I had this issue. And I tried that solution.

    It working only partially.
    There were 3 players. And each player could see 1 other player.
    Only tested once. But I'm gonna look for a different solution.

    Maybe I should do it right after i teleported all players. Instead of after every player.
    Because I'm teleporting a bunch of players at once.
     
  8. Offline

    Asdjke

    I have been suffering from this problem also. I ended up using nameplate changes of color to "update" they player. This worked quite well since what i needed it for was a team game.
     
Thread Status:
Not open for further replies.

Share This Page