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

Different player location in PlayerLoginEvent and PlayerSpawnLocationEvent


    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Running only my plugin.

    • This server is running CraftBukkit version 3002-Spigot-138d451-085fe67 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
    • Yes

      When you create a Listener for PlayerLoginEvent and log the event.getPlayer().getChunk() it will not much the one you get from PlayerSpawnLocationEvent. 


      In my case it showed (-13, 3) and then (-14, 2) for X Z respectively.


      I have added the test plugin and the server log. From the log file look at line 99 and 100


      What I would expect is the PlayerLoginEvent to report null for the chunk or to throw an exception if the Location isn't correct yet.


      After some testing I set the server spawn and logged out, after logging in it took the spawns location as my Location.



            Unassigned Unassigned
            raks321 Rasmus Koit
            0 Vote for this issue
            3 Start watching this issue