Hello,
Could the current hardcoded 75ms click debounce delay be made configurable?
From what I saw in the source, DeluxeMenus currently uses a hardcoded 75ms cache to prevent repeated clicks:
expireAfterWrite(75, TimeUnit.MILLISECONDS)
This works fine for basic menu interactions, but it can be too short for shop menus where commands need to check a placeholder-based balance, remove currency/items from the player, refresh the menu, then give the purchased item/reward.
In some cases, especially when using PlaceholderAPI placeholders or item-based currencies, refreshing the menu after 1 tick is not always enough because the placeholder value may take 2 ticks or more to update correctly.
Because of that, players can sometimes click fast enough to trigger the purchase twice before the updated balance/lore is applied, which can lead to duplicate rewards.
It would be useful to have a config option such as:
menu-click-cooldown-ms: 75
The default value could stay at 75ms to preserve the current behavior, but server owners could increase it to 100ms, 150ms, 250ms, or more depending on their shop setup.
This would be useful for menus that handle purchases directly through DeluxeMenus commands and rely on placeholders or item checks to update after a short delay.
Thanks ! :D
Hello,
Could the current hardcoded 75ms click debounce delay be made configurable?
From what I saw in the source, DeluxeMenus currently uses a hardcoded 75ms cache to prevent repeated clicks:
expireAfterWrite(75, TimeUnit.MILLISECONDS)This works fine for basic menu interactions, but it can be too short for shop menus where commands need to check a placeholder-based balance, remove currency/items from the player, refresh the menu, then give the purchased item/reward.
In some cases, especially when using PlaceholderAPI placeholders or item-based currencies, refreshing the menu after 1 tick is not always enough because the placeholder value may take 2 ticks or more to update correctly.
Because of that, players can sometimes click fast enough to trigger the purchase twice before the updated balance/lore is applied, which can lead to duplicate rewards.
It would be useful to have a config option such as:
menu-click-cooldown-ms: 75The default value could stay at 75ms to preserve the current behavior, but server owners could increase it to 100ms, 150ms, 250ms, or more depending on their shop setup.
This would be useful for menus that handle purchases directly through DeluxeMenus commands and rely on placeholders or item checks to update after a short delay.
Thanks ! :D