#DeluxeMenus Cooldown

1 messages · Page 1 of 1 (latest)

vivid wind
#

Hello!
My question is how to add a cooldown system to the DeluxeMenus plugin?

warm breachBOT
#
FAQ Answer:

An easy way to add cooldowns to DeluxeMenus

How to create cooldowns using MasterCooldowns:

  1. Start by creating a requirement (view/click/open)
requirements:
  cooldown:
    type: string equals
    input: '%mcd_isinactive_COOLDOWN-ID%'
    output: 'Yes'
  deny_commands:
  - '[message] &cTry again in %mcd_left_formatted_COOLDOWN-ID%, you are on cooldown!'
  1. Add the cooldown (e.g. on click)
    [console] mcd add %player_name% COOLDOWN-ID duration

This is not the only way to create cooldowns for DM, you can also use stuff like temp permissions.

vivid wind
#

Several cooldowns can be created at the same time, for example several items will have a cooldown

split root
#

yes

vivid wind
#

Okay

#

Thanks

sick vortex
#

Luckperms permission (temp permission)

vivid wind
#

Last question. How to set the GUI to update every second @split root

#

@sick vortex

sick vortex
vivid wind
#

Yes, but you can write an example

#

@sick vortex

sick vortex
vivid wind
#

Thanks

#

Not good, shouldn't update_interval be used? @sick vortex

sick vortex
#

yep sorry update: is for item

vivid wind
#

Not good

#

@sick vortex

sick vortex
#

how?

#

Not good mean?

vivid wind
#

It only updates when I open the gui again

sick vortex
#

try add update: true in items

vivid wind
#

It works

#

Thanks

sick vortex
#

😄

vivid wind
#

@sick vortex Could you please check if there are any errors in it?

#
#=========================================================
menu_title: '&8Example'
open_command:
open_commands:
register_command: true
update_interval: 1
size: 36
update: 1
open_requirement:
items:
  'normal':
    material: hdb-46225
    slot: 11
    priority: 2
    update: true
    hide_attributes: true
    display_name: '&7&lDaily Rewards'
    amount: 1
    lore:
    - ' '
    view_requirement:
      requirement:
        cooldown:
        type: string equals
        input: '%mcd_isinactive_daily_normal%'
        output: 'No'
    left_click_commands:
    - '[console] mcd add %player_name% daily_normal 86400'
  'normalcooldown':
    material: hdb-46225
    slot: 11
    priority: 1
    update: true
    hide_attributes: true
    display_name: '&7&lDaily Rewards'
    amount: 1
    lore:
    - ' '
    view_requirement:
      requirement:
        cooldown:
        type: string equals
        input: '%mcd_isinactive_daily_normal%'
        output: 'Yes'
    left_click_commands:```
split root
#

FYI: update will not update materials/items

sick vortex
#

Like Prestley said