Gunpowder Teleport

Gunpowder Teleport

37.9k Downloads

[Suggestion] Make teleport cancel if you move.

Gbergz opened this issue ยท 3 comments

commented

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

commented

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.

commented

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.

commented

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.