Change safe teleportation behaviour to prevent most glitches on survival servers
Kakifrucht opened this issue ยท 19 comments
One thing that really bothers me about Essentials is the safe teleporting feature. As it is right now, it simply disallows teleportation to unsafe locations. However this is extremely buggy, as half slabs and many things that are really not unsafe will be considered as unsafe by the algorithm. I would rather change the behaviour to allow teleportation, but instead of finding the next best place to teleport the player to (which is the reason that allows you to glitch through almost every wall), simply disable this and teleport the player to an unsafe location. What do you think about this?
Totally agree to make it a warning that the location might be unsafe and then just teleport them to the direct location (to avoid the glitches..)
How does #42 look?
That would be my suggestion. Even if they suffocate, this would fix most issues.
If this happens the user should get a warning that the destination MAY not be safe for teleport. So users could abuse this feature a little less for kinds of teleport kills/traps and stuff.
Well currently we have the config value teleport-safety: boolean, where true makes sure that you will be ported to a spot where you are safe, and false will simply cancel such tps.
You probably don't want to mess with existing configs, so changing this value to something that takes a string is probably of the table. Maybe add a config node value like teleport-safety-ignore: boolean, which if false (default) does nothing, and when set to true will always tp you to the actual location, without finding the next best one and maybe checking if the location is safe, if it is not safe print a warning message that the player may suffocate.
I think you're confused on how the safe teleportation works. What it does is look for the closest safe location near the target location within a certain radius. Once it finds one, it TPs you there. If it can't find one, then it doesn't TP you.
And to fit both sides the scan for a close safe location could be made toggle-able. Some kind a "force-teleport" or "bypass-safe-location".
Yes, I know some servers have wanted me to disable it entirely so it just brings you to the exact location no matter what. This is generally for factions servers that don't want people TP glitching into bases.
Exactly, and what I said would be a possibilty to do this I guess. Probably not the best design in regard to not requiring users to tweak their configs when they don't want this feature.
That would be nice, which is basically what I meant with an additional config node.