MyWarp

MyWarp

220k Downloads

Essentials setLastLocation

Perzan opened this issue ยท 2 comments

commented

Is your feature request related to a problem? Please describe

Not a problem, a feature request to allow for setting the last teleport location (Essentials) on every warp teleport.

Describe the solution you'd like

Soft-depend on Essentials, call User.setLastLocation(Location) whenever a player teleports to a warp.

Describe alternatives you've considered

I made a temporary plugin that sets up a handler for "PlayerCommandPreprocessEvent"

Additional context

Usually when players do /warp , and then do /back, they aren't taken to their previous location before using /warp. I know it seems like it's more of an Essentials issue really, so I'll be sure to open a ticket on their repo as well to last teleport locations are set on almost every teleportation event. (I tried making a plugin for that actually, but it seems to be buggy with essentials ultimately).

commented

I will look into it. For reference, Essentials' implementation can be found here.

commented

I just tested this again with the last development build: It works, as long as register-back-in-listener is set to true in the EssentialsX config.yml.

This may or may not be caused by explicitly adding the teleport cause in 1b75d82. Anyway, I am happy that it works now. :)