EssentialsX

EssentialsX

2M Downloads

Feature request for separate cooldowns for each teleportation command that only triggers if successful

LOOHP opened this issue ยท 1 comments

commented

### Feature request
Feature description
There are currently two ways to apply cooldowns within essentials to teleportation commands such as /spawn /home /tpa and /tpahere. One is setting the teleportation cooldown time (which is shared for all teleportation actions) and the other is setting the cooldown for each command (which triggers even if the teleportation is cancelled). However here is the problem, there is currently no way to set a separate cooldown for each teleportation command and have the cooldown only trigger when the teleportation is successful.

This is how this work:

  1. The player runs /spawn (cooldown doesn't start)
  2. The player stands still for 5 seconds (as defined in config teleportation warmup)
    If the player moves and the teleportation is cancelled, cooldown is never triggered.
  3. The player teleports. (Then the cooldown triggers for /spawn)
  4. The player will be teleported to spawn and won't be able to use /spawn until cooldown ends.
    However the player will still be able to use /home /tpa /tpahere etc.

Listing homes and tpa/tpahere denied also won't trigger cooldown, just like moving/being attacked during warmup.

How the feature is useful
The feature is useful for servers who don't want players to spam teleportation commands back and forth while still allowing players to do stuff like teleporting to spawn to pick some stuff up then teleport back home once.

commented

The way cooldowns work currently makes this particular behaviour difficult to accomplish - a cooldown can't currently be checked in one place and then triggered elsewhere. I've been considering changing how cooldowns work for a while, but it's currently a lot of effort to change this for the few commands that the current system doesn't work for.