Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

Additional /back teleport points

Open seema84 opened this issue 8 years ago • 18 comments

can you please add more than one back points? maybe the last 10 how it does commandbook

seema84 avatar Dec 21 '17 16:12 seema84

This sounds like an interesting feature, any suggestions on how to implement it?

mishyy avatar Dec 21 '17 20:12 mishyy

it works as one back point, only the latest points need to cache

seema84 avatar Dec 21 '17 21:12 seema84

can you go into more detail? :)

drtshock avatar Dec 26 '17 18:12 drtshock

example:

  1. use /back and go to the last point (tp,death etc)
  2. use /back and go to the second last point (tp,death etc)
  3. use /back and go to the third last point (tp,death etc)
  4. etc

seema84 avatar Dec 27 '17 00:12 seema84

That seems to be a great idea but players who uses /back at Point A to B like 12 times would be confusing or it would cache?^^

TNTUP avatar Feb 09 '18 12:02 TNTUP

yes i would cache even if it seems pointless

seema84 avatar Feb 09 '18 17:02 seema84

Sounds useful, although I would suggest by default keeping the normal behavior (where it takes you back and forth between point A and B). Could use something like /back 2 to go back two teleportations, similar to how plugins like WorldEdit have //undo 2, etc.

pop4959 avatar Apr 30 '20 07:04 pop4959

Hello, I'm currently working on this feature but have some doubts regarding it, we will be actually caching the last locations of the user, so I expect the idea is not persisting any data (not like last location that is currently serialized and persisted).

So I have some questions about the possible implementations:

  • Should we just cache this data in memory while the user is connected and reset it every time the user reconnects.
  • We persist the data as lastlocation does but we set a limit of back locations and we delete in a FIFO. In this implementation we could also set different limits for different permissions, so a user can have 5 backs while another can have 20.

werogg avatar Mar 30 '23 16:03 werogg

Hello, I'm currently working on this feature but have some doubts regarding it, we will be actually caching the last locations of the user, so I expect the idea is not persisting any data (not like last location that is currently serialized and persisted).

So I have some questions about the possible implementations:

  • Should we just cache this data in memory while the user is connected and reset it every time the user reconnects.
  • We persist the data as lastlocation does but we set a limit of back locations and we delete in a FIFO. In this implementation we could also set different limits for different permissions, so a user can have 5 backs while another can have 20.

The former

JRoy avatar Mar 30 '23 17:03 JRoy

So just caching the data true? (Not sure about "the former" meaning in this context)

werogg avatar Mar 30 '23 18:03 werogg

I'd say just cache them in memory. You can still store them in a limited size queue.

It wouldn't be too difficult to persist these locations to disk, but I also don't really see how useful this would be to players.

mdcfe avatar Mar 30 '23 18:03 mdcfe

Actually the lastlocation is fully persisted, so even if the user disconnects or the server is restarted, he is allowed to use /back again. So this option would be unavailable in the /back <integer> feature.

werogg avatar Mar 30 '23 18:03 werogg

The implementation of this wouldn't be difficult, but I'm not sure I get how and why people would actually use this feature.

How useful is it to be able to go back to your 2nd/3rd/4th last teleport location? You might remember the last two or three times you teleported or died but I can't imagine most players would remember much more than that.

You could give users some way to check what the coordinates of their last N locations actually are (eg /backinfo 3), but even if they could see the coordinates and world, there's no guarantee that these would mean anything to the average player. If they can't remember where the locations are, they will either spam /back to see each location or they'll just not bother using the queue at all.

The other problem is what do you do if someone repeatedly /backs? Their queue will fill up with duplicate locations (or near duplicates), making anything beyond the last few useless for them. It would also be a pain to mentally track those locations at the actual numbers, and if you accidentally /back to the wrong one you might just lose one of the locations.

Both of these problems could be solved by letting players pin /back locations and name them... at which point you've just reinvented /home.

I guess there's some argument for being able to cycle back to an older location just to create a home there? I'm just concerned that the practical use cases for this in its current form are quite limited, and I think I need to see some actual scenarios where this might be more useful to players and server owners than simply setting homes.

mdcfe avatar Mar 30 '23 19:03 mdcfe

Why should you not be able to remember? In fact, it happens to "me" quite often that I would like to quickly return two or three points after a teleport.

Since it's been many years now, I don't really remember how commandbock implemented it.

seema84 avatar Mar 30 '23 19:03 seema84

I agree with @mdcfe on this behavior most likely leading to a lot of confusion. Perhaps there is a better way than incorporating this directly into back. Maybe a /recent command which lists your last X recent unique locations? Then with /back # instead of going that many locations back, it just goes to the location listed in your recent. Or maybe something else. But as-is this is way too confusing to expect most players to find useful.

pop4959 avatar Mar 31 '23 05:03 pop4959

You are probably right that a reverse command without addition and as default could cause confusion. Your alternative approaches don't sound bad in principle.

seema84 avatar Mar 31 '23 10:03 seema84

Maybe a /recent command which lists your last X recent unique locations?

Lists them how? Not that I disagree, just that I wouldn't know how to implement this; I'm not sure (world, x, y, z) is meaningful enough to be useful to most players most of the time.

merenze avatar Mar 03 '25 22:03 merenze

Maybe a /recent command which lists your last X recent unique locations?

Lists them how? Not that I disagree, just that I wouldn't know how to implement this; I'm not sure (world, x, y, z) is meaningful enough to be useful to most players most of the time.

I would say maybe listen them as to what caused the teleport. So like "/tpa to Player1" or "/warp spawn".

JRoy avatar Mar 03 '25 22:03 JRoy