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

PlayerRespawnEvent: Players location changed before event called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • Windows 10, Fresh spigot installation.

    • git-Spigot-b5a13e6-bf45161 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)
    • Yes

      Class PlayerList:
      The if-branch for the player's bed location has the following line:

      entityplayer1.setPositionRotation(vec3d.x, vec3d.y, vec3d.z, f1, 0.0F);
      

      This changes the player's location to the bed spawn point.

      With that playerRespawnEvent.getPlayer().getLocation() returns a false location (the location from the bed) and not the actual player location.

       

      With bed:

      [21:42:04] [Server thread/INFO]: [Joo200: Killed Joo200]
      [21:42:06] [Server thread/INFO]: [WorldGuard] Found respawn from Joo200:
      [21:42:06] [Server thread/INFO]: [WorldGuard] isBedSpawn ? true ; isAnchorSpawn ? false
      [21:42:06] [Server thread/INFO]: [WorldGuard] Player location: (-3.5, 72.0, -198.5)
      

      Without bed:

      [21:45:41] [Server thread/INFO]: [Joo200: Killed Joo200]
      [21:45:43] [Server thread/INFO]: [WorldGuard] Found respawn from Joo200:
      [21:45:43] [Server thread/INFO]: [WorldGuard] isBedSpawn ? false ; isAnchorSpawn ? false
      [21:45:43] [Server thread/INFO]: [WorldGuard] Player location: (-4.153057200611828, 72.0, -196.31210347011782)
      

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

              Created:
              Updated:
              Resolved: