Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Make teleport cancel if you move. #3

Open
Gbergz opened this issue Sep 4, 2020 · 3 comments
Open

[Suggestion] Make teleport cancel if you move. #3

Gbergz opened this issue Sep 4, 2020 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Gbergz
Copy link

Gbergz commented Sep 4, 2020

Title^

If you move the teleportation countdown should get cancelled.
Right now you can run around freely while the countdown is counting down, really no point of the countdown if it doesn't cancel, yea?

- Gbergz

@Martmists-GH
Copy link
Member

I think this would be best configurable, but cancelling it immediately might be kinda tricky with the way we currently handle it. Comment for ideas on how to rewrite the current system (Thread.sleep in another thread) for this, or if we should just use a PlayerPreTeleportCallback.

@Martmists-GH Martmists-GH added enhancement New feature or request help wanted Extra attention is needed labels Sep 4, 2020
@Gbergz
Copy link
Author

Gbergz commented Sep 4, 2020

An idea instead of cancelling it immediately is you can move around freely on the block you're standing on, but as soon as you enter another block it cancels. Just so it doesn't cancel if you accidentally clicked the wasd buttons for 0.01s.

@Martmists-GH
Copy link
Member

Gbergz: I meant in how we handle it internally; We could cancel the thread, but we'd need a reference to it. Alternatively we could use a concurrent map to store block teleporting from, and check periodically, but an efficient implementation would have to be found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants