A simple right click of a bed (Anything that extends BlockBed) will set your spawn to that location. Includes a configurable dimension blacklist.
Not entirely sure if this is needed clientside. Did not test. Feel free to try and let me know