Skip to content

Astroworld-MC/AstroBackCooldown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AstroBackCooldown

Configurable per-group cooldowns for the /back command from EssentialsX. Prevent players from instantly returning to their death location by assigning different cooldown durations based on their LuckPerms permission group.

Built by Astroworld | Need hosting? Try Astroworld Hosting

Features

  • Per-group cooldown times via config.yml
  • Optional LuckPerms integration (falls back to a default cooldown without it)
  • Bypass permission for staff
  • Configurable cooldown message with {minutes} and {seconds} placeholders
  • Configurable command aliases (supports custom /back aliases)
  • Cooldowns persist across restarts
  • Hot-reload with /backcooldown reload

Requirements

  • Paper/Spigot 1.20+
  • Java 17+
  • EssentialsX (required)
  • LuckPerms (optional, recommended)

Installation

  1. Drop AstroBackCooldown-1.0.0.jar into your plugins/ folder.
  2. Restart the server. A default config.yml will be generated.
  3. Edit plugins/AstroBackCooldown/config.yml to set your group cooldowns.
  4. Run /backcooldown reload or restart the server.

Commands

Command Description Permission
/backcooldown reload Reload the configuration file astrobackcooldown.admin

Permissions

Permission Description Default
astrobackcooldown.admin Allows reloading the plugin config op
astrobackcooldown.bypass Bypass the /back cooldown entirely false

Configuration

# Permission group cooldowns (in seconds).
# Maps LuckPerms primary group names to cooldown durations.
# If no group matches, the "default" value is used.
# Set a group to 0 to give it no cooldown.
cooldowns:
  default: 2700      # 45 minutes
  vip: 1800          # 30 minutes
  vipplus: 1200      # 20 minutes
  mvp: 900           # 15 minutes
  admin: 0           # no cooldown

# Permission node that bypasses the cooldown entirely.
bypass-permission: "astrobackcooldown.bypass"

# Message shown when a player is still on cooldown.
# Placeholders: {minutes} and {seconds}
message-format: "&cYou can use /back again in {minutes} minutes and {seconds} seconds."

# Which command labels trigger the cooldown.
command-aliases:
  - "back"
  - "essentials:back"

How It Works

  1. When a player runs /back, the plugin intercepts the command.
  2. If the player has the bypass permission, the command runs normally.
  3. Otherwise, the plugin looks up the player's LuckPerms primary group and finds the matching cooldown from config.yml.
  4. If the player is still on cooldown, the command is blocked and a message is shown.
  5. If the cooldown has expired, the plugin dispatches the /back command and starts a new cooldown after the teleport completes.

Without LuckPerms installed, all players receive the default cooldown value.

License

MIT License - see LICENSE for details.