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)