[SPIGOT-6092] Player#setBedSpawnLocation - NullPointerException Created: 20/Aug/20  Updated: 22/Aug/20  Resolved: 22/Aug/20

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: William Surgeon Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.16.2, API, Beds
Environment:

OS: Ubuntu Server 18.04.3 (Linux: 4.15.0-70-generic)
Java: Oracle JRE 1.8.0 update 161 build 12


Attachments: File test-plugin-1597943489.jar    
Version: git-Spigot-379750e-eaf0bac
Guidelines Read: Yes

 Description   

When attempting to clear a player's bed spawn using Player#setBedSpawnLocation(Location), the server throws a NullPointerException
, originating from this line in CraftPlayer.

It's trying to get the yaw component of a location which has been tested to be null.

The attached plugin has one command (/deletebed) that will use the method mentioned above to remove a player's bed spawn location. You will need to have set your bed spawn before using the command for it to work.



 Comments   
Comment by Parker Hawke [ 22/Aug/20 ]

Fixed in the following PR:
https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/733

Generated at Sat Apr 05 09:38:19 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.