Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Add PlayerGetRespawnLocationEvent

Open Cryptite opened this issue 1 year ago • 7 comments

There is a non-trivial amount of work done to determine a safe location to respawn a player. This event simply provides for plugin developers to provide their own, known respawn location event to save on any performance implications with determining a respawn location.

Cryptite avatar May 01 '23 20:05 Cryptite

Hi! Will this resolve https://github.com/PaperMC/Paper/issues/9081? Also see this

molor avatar May 01 '23 20:05 molor

Hi! Will this resolve #9081? Also see this

Moved! Thanks. I'm not sure this patch is really meant to solve that issue which sounds more like plugin funkyness. If this inadvertently fixes that somehow, then huzzah.

Cryptite avatar May 01 '23 21:05 Cryptite

I understand this could arguably called PlayerPreRespawnEvent... ish. Open to renaming suggestions if need be.

Cryptite avatar May 01 '23 21:05 Cryptite

i think thats a good name for it.

Leguan16 avatar May 01 '23 22:05 Leguan16

Decided to go ahead and rename it to Pre

Cryptite avatar May 03 '23 16:05 Cryptite

Does it makes sense to include the respawn reason here for more context ?

Sure why not

Cryptite avatar May 03 '23 18:05 Cryptite

This event is called in that weird place where some changes are not persisted, i think this should be stated somewhere in the documentation like the respawn event

Lulu13022002 avatar May 07 '23 17:05 Lulu13022002