"Internal server error" on connect, under certain circumstances

Discussion in 'Plugin Development' started by petterroea, Jul 10, 2012.

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

    petterroea

    Hi. I am working on a pvp plugin, called shootout. But something is wrong. When a player connects, and if the player spawns in "World" upon login, i get a Internal Server error.

    The setup is like so:

    I have a world called "lobby". If you spawn there(From being there last time you played), everything is ok.
    I also have a world called "World", the default world. If you spawn there, you loose the connection, with the client error "Internal server error", and the server error:


    Code:
    [INFO] Disconnecting Player [/127.0.0.1:52040]: Internal server error
    2012-07-10 22:16:23 [WARNING] Failed to handle packet: java.lang.IllegalStateException: Failed to add player. net.minecraft.server.EntityPlayer@1d1d(Player at -271.0,64.0,1510.0) already is in chunk -17, 94
    java.lang.IllegalStateException: Failed to add player. net.minecraft.server.EntityPlayer@1d1d(Player at -271.0,64.0,1510.0) already is in chunk -17, 94
        at net.minecraft.server.PlayerInstance.a(PlayerInstance.java:31)
        at net.minecraft.server.PlayerManager.addPlayer(PlayerManager.java:88)
        at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:143)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:129)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:94)
        at net.minecraft.server.Packet1Login.handle(SourceFile:68)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:48)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:61)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:567)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    I deactivated teleport from World on startup, but the same thing happens. What is wrong?
     
  2. is he online ad the time of the teleport, can you give us some short code examples that cause this?
     
  3. Offline

    petterroea

    As i said, my teleport code was deactivated. The problem is on login
    (I debugged it without teleport).

    Here is a more complex description of how it works:

    Lobby(1 minute wait before new round, if there is more then 1 player on the server)->Game itself(Now running in "world". If you disconnect here and join, the game crashes)->Lobby
     
  4. is their player.dat not messed up then if your not the cause?
     
  5. Offline

    petterroea

    Well, might be. But i dont know what is causing that. Give me 5 minutes to check my disconnect code for anything stupid

    Nope. No stupid quit code. It seems that when i connect, the server tries to spawn me in both dimensions...
    (New knowledge)

    I fixed it! In the other thread, someone suggested teleporting a few ticks after join. Well, i forgot to implement that on the player join part of my plugin. HAPPY!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
  6. I hope your using the schedular to teleport and not creating threads by your own (can cause deadlocks)
     
  7. Offline

    petterroea

    I am using the sceduler
     
Thread Status:
Not open for further replies.

Share This Page