[SPIGOT-6114] PlayerRespawnEvent: Players location changed before event called Created: 27/Aug/20 Updated: 28/Aug/20 Resolved: 28/Aug/20 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Joo200 | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | Beds, event, respawn | ||
Environment: |
Windows 10, Fresh spigot installation. |
Version: | git-Spigot-b5a13e6-bf45161 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT) |
Guidelines Read: | Yes |
Description |
Class PlayerList: 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) |