Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Incorrect teleportation safety message

Open JHarris12345 opened this issue 2 years ago • 6 comments

Type of bug

Other unexpected behaviour

/ess dump all output

https://essentialsx.net/dump.html?id=c9ffe41de9fc4828b77c65c519d1b505

Error log (if applicable)

No response

Bug description

When you try to set a home in an "unsafe" location and you are in survival mode, it says this:

image

However, teleport-safety in my config is set to true.

Steps to reproduce

  1. Stand half off a block (so the location is considered unsafe) and try to set a home
  2. It will say it is unsafe and teleport-safety is disabled despite it not being disabled

Expected behaviour

It should set the home

Actual behaviour

It doesn't set the home

JHarris12345 avatar Aug 24 '22 12:08 JHarris12345

Does it work when you stand on top the block instead? It sounds like the location you are trying to set a home to is mid-air, which doesn't sound unreasonable to consider unsafe in survival mode.

pop4959 avatar Sep 03 '22 20:09 pop4959

The issue isn’t so much that it is telling me it is unsafe. The issue is that it tells me teleport safety is disabled when it is not. So I dont believe the check should even be a thing.

JHarris12345 avatar Sep 03 '22 20:09 JHarris12345

I see, I overlooked that there were 2 issues here. I'll mark bug for the message (should probably say "enabled" there), but the actual safety check seems legit. Note I haven't actually tested it myself. If you're convinced it should be safe, we can double check.

pop4959 avatar Sep 03 '22 20:09 pop4959

The location is 100% unsafe. I am purposely making it unsafe for the purpose of the glitch. The thing is, if teleport safety is enabled then there shouldnt be a check preventing you making unsafe homes because teleport safety will teleport you to the safest location when going to it anyway. Or so I think it does? But yeah the message definitely has an error regardless

JHarris12345 avatar Sep 03 '22 20:09 JHarris12345

I can see the reasoning there, though it doesn't work that way because that implies that when the user sets a home, that location is not necessarily where they will end up when teleporting, which would be confusing by design.

Teleportation safety doesn't make any guarantees aside from that the location it chooses is safe. For example, in your case where you are standing half off a block, it may not teleport you on the block, but down the cliff instead, and that would be entirely within its spec. Because of this, it's mostly used in areas where the location is not predetermined.

So basically, the message contents of that error need to be re-evaluated, but it has the right intention (of preventing users from setting homes in unsafe locations).

pop4959 avatar Sep 03 '22 21:09 pop4959

Yup that definitely makes sense. Then the only issue is just the wording of the message :D

JHarris12345 avatar Sep 03 '22 22:09 JHarris12345

What would be the desired wording? Should there be an entirely new message for this situation, or should "teleport-safety is disabled" instead reflect the true setting of teleport-safety (ie. either "teleport-safety is enabled" or "teleport-safety is disabled" depending on config value)?

ColeRiggle avatar Dec 11 '22 06:12 ColeRiggle