Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-5848

PlayerSpawnLocationEvent throws NPE when setting a location of another world

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • None
      • local windows server

      Shouldn't be important for that bug (please ask for further information if required)

    • git-Spigot-758abbe-38de0b8 (MC: 1.16.1) (Implementing API version 1.16.1-R0.1-SNAPSHOT)
    • Yes

    Description

      After joining the server, triggering the PlayerSpawnLocationEvent and a plugin tries to set the spawn to a location in another world, the server throws this exception and every entity freezes for the player, who have to rejoin now. In fact that the player switches to the world before the error comes up, he is in the correct world and everything works fine.

       

      This bug does not appear on a Spigot-v1.15.2 server.

      A test plugin is attached.

       

      Thank you for getting into this bug report!

       

      NullPointerException:

      Error executing task on Server
      java.lang.NullPointerException: null
       at net.minecraft.server.v1_16_R1.ChunkMapDistance.b(ChunkMapDistance.java:244) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.PlayerChunkMap.movePlayer(PlayerChunkMap.java:956) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.ChunkProviderServer.movePlayer(ChunkProviderServer.java:482) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.PlayerConnection.a(PlayerConnection.java:479) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.PacketPlayInTeleportAccept.a(SourceFile:30) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.PacketPlayInTeleportAccept.a(SourceFile:8) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:19) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.TickTask.run(SourceFile:18) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeTask(SourceFile:144) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.executeNext(SourceFile:118) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.MinecraftServer.aZ(MinecraftServer.java:941) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.MinecraftServer.executeNext(MinecraftServer.java:934) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.IAsyncTaskHandler.awaitTasks(SourceFile:127) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.MinecraftServer.sleepForTick(MinecraftServer.java:918) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:850) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.1.jar:git-Spigot-758abbe-38de0b8]
       at java.lang.Thread.run(Unknown Source) [?:1.8.0_231]

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            CodingAir CodingAir
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: