"Fetching addPacket for removed entity: CraftPlayer{name=mynamehere}"?

Discussion in 'Bukkit Help' started by Kabino, Feb 28, 2012.

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

    Kabino

    I just recently started getting this error, and I can't think of what could be causing this. Whenever I join, I am instantly disconnected with like 3 "Fetching addPacket for removed entity: CraftPlayer{name=mynamehere}" messages in the console. The client just goes to the dirt background and crashes. Any ideas?
     
  2. Offline

    fank

    I got the same message.

    When i use this:
    Code:
    @EventHandler(priority = EventPriority.HIGH)
        public void onPlayerJoin(PlayerJoinEvent event) { 
            Bukkit.getServer().getPlayer(event.getPlayer().getName()).kickPlayer("LOL!");
        }
    ill get a server.log like this:
    Code:
    2012-03-04 21:45:46 [INFO] Fank [/127.0.0.1:53297] logged in with entity id 3636 at ([world] 63.5, 71.62000000476837, 257.5)
    2012-03-04 21:45:46 [INFO] [WhitelistSQL] Fank is not whitelisted -> kick
    2012-03-04 21:45:55 [INFO] Fank [/127.0.0.1:53307] logged in with entity id 3639 at ([world] 63.5, 71.62000000476837, 257.5)
    2012-03-04 21:45:55 [INFO] [WhitelistSQL] Fank is not whitelisted -> kick
    2012-03-04 21:45:55 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:46:07 [INFO] Fank [/127.0.0.1:53317] logged in with entity id 3640 at ([world] 63.5, 71.62000000476837, 257.5)
    2012-03-04 21:46:07 [INFO] [WhitelistSQL] Fank is not whitelisted -> kick
    2012-03-04 21:46:07 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:46:07 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:25 [INFO] Fank [/127.0.0.1:53343] logged in with entity id 3645 at ([world] 63.5, 71.62000000476837, 257.5)
    2012-03-04 21:47:25 [INFO] [WhitelistSQL] Fank is not whitelisted -> kick
    2012-03-04 21:47:25 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:25 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:25 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:39 [INFO] Fank [/127.0.0.1:53362] logged in with entity id 3646 at ([world] 63.5, 71.62000000476837, 257.5)
    2012-03-04 21:47:39 [INFO] [WhitelistSQL] Fank is not whitelisted -> kick
    2012-03-04 21:47:39 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:39 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:39 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    2012-03-04 21:47:39 [INFO] Fetching addPacket for removed entity: CraftPlayer{name=Fank}
    
    nothing crashes it just SPAM the server like it will show the messages: n-1
    example: 500. login it will show "Fetching addPacket for removed entity..." 499times!
     
  3. Offline

    amoliski

    If you are still having the problem, I fixed it by moving the player.getName().kickPlayer(""); to a runnable thread, and called it as a delayed task with the scheduler.

    The actual Kick Runnable I use:
    Code:
     
    package net.moliski.bukkit.DeathTimeout;
     
    import org.bukkit.entity.Player;
    public class KickRunner implements Runnable{
               
    [INDENT=1]String kickmessage;[/INDENT]
    [INDENT=1]Player player;[/INDENT]
     
    [INDENT=1]public KickRunner(String kickmessage, Player player){[/INDENT]
    [INDENT=2]this.kickmessage = kickmessage;[/INDENT]
    [INDENT=2]this.player = player;[/INDENT]
    [INDENT=1]}[/INDENT]
    [INDENT=1]public void run() {[/INDENT]
    [INDENT=2]player.kickPlayer(kickmessage);[/INDENT]
    [INDENT=1]}[/INDENT]
    }
    
    And then to use it I do a:
    Code:
      
    getServer().getScheduler().scheduleAsyncDelayedTask(this,new KickRunner("LOL!", 10L);
    
    I think the problem was kicking them while they were still being added to the server, waiting a few ticks stopped the strange error.
     
Thread Status:
Not open for further replies.

Share This Page