Prevent teleporting to bedhome if the bed was destroyed and then replaced.
stapleshotz opened this issue ยท 2 comments
EssentialsX version (/essentials
): 2.0.1-b488
Server software (/version
): Spigot 1.12.1-R0.1-SNAPSHOT
I'm setting up a role-play server and I'm using bed homes. It's working great except for one thing. When a player's bed is destroyed, they're unable to teleport there. That's what I want. BUT when the bed is then replaced, the player is able to teleport there again as if the bed was never destroyed.
What I'd like to have happen: If a bed is destroyed and then replaced, any player homes that were set to that bed are deleted. So breaking a bed permanently wipes away any homes set there. (until a player travels there and sets them again)
This wouldn't be an issue if players didn't use bedhomes aggressively. My server is a competitive Factions server that encourages building. If a player manages to break into an enemy faction base and finds their beds, they can set a home there and there's nothing that faction can do to get rid of it short of never placing a bed in that spot again, which isn't a great solution.
We'd need to check every block break to:
- Determine whether the block is a bed
- Determine whether the block is a home
I'm not sure whether the performance hit is worth it, although I suppose this could be made configurable.