Closed lexiccn closed 1 year ago
This event started getting listened to backwards semi-recently. It will behave correctly in teh next pre-release but if you need something to test with 0.98.3.0 would also work correctly.
Nevermind it wasn't broken.
I think a PlayerSetBedSpawnPointEvent might be ideal, which would not throw if PlayerDeniedBedUseEvent has happened.
The PlayerEnterBedEvent could just be used instead of us adding a new event, it won't fire if we cancel the interact event.
That too.
The reason that doesn't work for this is Respawn Anchors; they don't throw an event on their own that I can find; hence would need identical checks to Tagged BED || DisallowedAnchorClick thing to get it
Not saying we wont add one, but this is really a suggestion for the Spigot team: a PlayerSetSpawnEvent to go into https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/player/package-summary.html
Paper also already has that if you're targeting that: https://jd.papermc.io/paper/1.19/com/destroystokyo/paper/event/player/PlayerSetSpawnEvent.html
Thank you - for what I'm doing yeah I am; I don't know how I've apparently missed that repeatedly while using Paper javadocs
I'll leave this open because it might still be useful for non-Paper servers or Towny Addons like preventing in war either way/admin here can close
Please explain your feature request to the best of your abilities:
There is an event for PlayerDeniedBedUse which is very helpful; however this requires it to fail already
If it passes but there is a reason to cancel; such as: Combat tagged (CombatLogX) In a siegezone (SiegeWar)
Then there is no event to do anything with
I guess there is a few ways to handle this;
It's not really that unreasonable to just have the same checks in my own plugin; but it would be nicer to integrate with Towny already doing it