Skip to content

Conversation

@aidanvalero
Copy link

Description

Fixes a bug where command cooldowns were being applied even when commands typed in different cases (e.g., /EAT, /Eat) failed to execute.

Changes

  • Normalized the fullCommand string to lowercase in EssentialsPlayerListener.handlePlayerCommandPreprocess() to ensure case-insensitive cooldown matching
  • This aligns cooldown behavior with the existing case-insensitive command lookup logic

Testing

  • Commands like /eat, /EAT, /Eat now all properly share the same cooldown timer
  • Cooldowns are only applied when the command is successfully recognized by the system
  • Players can no longer trigger cooldowns by typing invalid capitalized commands

Fixes #5915

Normalize command to lowercase for cooldown matching to prevent cooldowns from being applied when commands typed in caps fail to execute. Commands like /EAT or /Eat will now properly match the lowercase cooldown pattern and only apply cooldown when the command successfully executes.

Fixes EssentialsX#5915
Copy link
Member

@JRoy JRoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not fix the bug described. The issue is that command may only be lowercase and thus do not execute when you use caps in them, but we still count cooldown on those commands.

@JRoy JRoy closed this Nov 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

command cooldown bug

2 participants