Multiverse-Core

Multiverse-Core

6M Downloads

[Bug]: Register cooldown for /mvtp portal destinations

FireController1847 opened this issue · 12 comments

commented

Describe the feature

When /mvtp is used with a portal destination (ex: /mvtp <player> p:<portal>), the portal cooldown should apply.

How is the feature useful to all Multiverse users?

Presumably, the portal cooldown is meant to prevent a loop of teleporting players there and back very quickly as they walk out of the portal. The only problem is... if you teleport someone to a portal using mvtp, this problem comes back since the cooldown doesn't apply. I find it very frustrating to teleport to a portal using mvtp, walk out, and accidentally walk back into it very quickly. Hence, the suggestion.

Reproduction

  • Create a 1.20.1 Paper server
  • Stop the server and change portalcooldown to 10000, then start again
  • Add Multiverse-core and Multiverse-portals to the server
  • Create a portal /mvpcreate portal w:world:0,0,0
  • Run /mvtp p:portal to teleport to the portal
  • Go back through and notice no cooldown has been started

Agreements

  • I have searched for and ensured there isn't already an open issue regarding this.
commented

Reclassifying as a bug.

commented

Looking through the MVP code, this looks like you would need to change the destinations API to implement it. Too hard for me xD

commented

Tested and this is an issue

commented

Added reproduction instructions

commented

hmm not really, portalcooldown is for when you USE the portal, not when you teleport TO the portal location. There is a difference there. I think what you are looking for is a teleport cooldown for specific destinations?

commented

hmm not really, portalcooldown is for when you USE the portal, not when you teleport TO the portal location. There is a difference there. I think what you are looking for is a teleport cooldown for specific destinations?

I think the idea is, in regards to portals, it's intended to prevent walking back into it immediately. I would argue that this request would claim the feature would be incorrectly named or should be renamed if teleporting to a portal is not considered a portal cooldown — functionally, teleporting to a portal is equivalent to walking through one

commented

I don’t thinks “functionally, teleporting to a portal is equivalent to walking through on”, walking through a portal will teleport you to another location based on what you set in mvportals, which is completely different from teleporting to the portal location using a tp command, it is 2 different actions. The portalcooldown is a config in mvportals for walking through a portal. I don’t think combining both behaviours into a single cooldown make sense. Tho i’m open to the idea of adding teleport cooldown support for specific mv destinations.

commented

Also thinking of it… if you are teleporting to a portal, then using the portal to teleport to another destination, why not setup something that can teleport directly to the destination already?

commented

I don’t thinks “functionally, teleporting to a portal is equivalent to walking through on”, walking through a portal will teleport you to another location based on what you set in mvportals, which is completely different from teleporting to the portal location using a tp command, it is 2 different actions. The portalcooldown is a config in mvportals for walking through a portal. I don’t think combining both behaviours into a single cooldown make sense. Tho i’m open to the idea of adding teleport cooldown support for specific mv destinations.

I would argue that there is already an explicit distinction between teleporting to a portal using a portal destination and using an exact position causes the line to be blurred. Teleporting using a portal destination is functionally equivalent. The scenario you are describing would be teleporting to the position of the portal using an explicit destination. Though this descriptor is neither here nor there.

Regardless, it doesn't really matter to me how the functionality is implemented — the issue remains the same, when you teleport using a portal destination, you can easily walk back into it causing confusion and disorientation, and is especially annoying for things like warps. The specifics on how this functionality is decided to be fixed does not matter to me.

commented

Also thinking of it… if you are teleporting to a portal, then using the portal to teleport to another destination, why not setup something that can teleport directly to the destination already?

I think there may have been a misunderstanding of the issue. It is not teleporting to a portal to use that portal. It is teleporting to the portal, and accidentally walking into it.

In my instance, I have a portal room at spawn which brings people to explicit warp points around my map. I also have a command which allows these players to warp from anywhere around the world to these waypoints, not just through spawn. If you warp to a portal using the command, it's really easy to accidentally walk back into it and end up at spawn, when you wanted to be at the waypoint. Hence, the issue.

I can provide a video at a future date if it would help with visualizing the issue.

commented

okay, I got it now, I think what you want is a delay before the portal does it teleport. Abit like how nether portal works in survival. Is that correct?

Cooldown, on the other hand, is meant for the frequency of how often you enter the portal, so if you haven't even use the portal yet, cooldown doesn't and shouldn't apply.

commented

okay, I got it now, I think what you want is a delay before the portal does it teleport. Abit like how nether portal works in survival. Is that correct?

I want the same functionality as the existing portal cooldown, but for teleporting to portal destinations. Or, worded in a different way, I want a cooldown following teleportation to the portal to prevent accidental re-entry.