hey I have a question how to make a command or configuration in such a way that when the player opens the gui and clicks on the item in the gui then the ksola will send the command: "/cc give PawelBooss customcrafting:recipe_book" but the player will only be able to get it once? or so that he can get this item every 8 hours e.g. so that there is no situation that someone takes this item 1000 times for no reason
#how to set cooldown or something on commands in gui?
1 messages · Page 1 of 1 (latest)
An easy way to add cooldowns to DeluxeMenus
How to create cooldowns using MasterCooldowns:
- 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!'
- 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.
Requested by: gabytm • dm-cooldown
@frail gale
thx
and where should I add it to my config?
'examplecddddOOO':
material: CRAFTING_TABLE #/cc give PawelBooss customcrafting:recipe_book
slot: 23
priority: 2
update: true
hide_attributes: true
display_name: '&eCraftingi' #
lore:
- '&7'
- '&8▶ &aKliknij by zobaczyć'
- '&7'
priority: 1
view_requirement:
requirements:
shop_perm:
type: has permission
permission: deluxemenus.info
left_click_commands:
- '[sound] ENTITY_LLAMA_CHEST'
- '[console] cc give %player_name% customcrafting:recipe_book'
- '[close]'
@minor prawn sorry for ping
you can tell me?
did i do well?
'examplecddddOOO':
material: CRAFTING_TABLE
slot: 23
priority: 2
update: true
hide_attributes: true
display_name: '&eCraftingi' #
lore:
- '&7'
- '&8▶ &aKliknij by zobaczyć'
- '&7'
priority: 1
view_requirement:
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!'
shop_perm:
type: has permission
permission: deluxemenus.info
left_click_commands:
- '[sound] ENTITY_LLAMA_CHEST'
- '[console] cc give %player_name% customcrafting:recipe_book'
- '[close]'
[23:58:55 ERROR]: [DeluxeMenus] Detected invalid configuration in file: info_menu.yml
[23:58:55 WARN]: [DeluxeMenus] Menu: info_menu in file: info_menu.yml not loaded.
okay i have error
@minor prawn
- you have duplicated
priority:set to the item - you'd want to move the 2nd requirement (
shop_perm:) above thedeny_commands:if you want to use multiple requirements
there you go https://paste.helpch.at/comayisajo.yaml
next time, make sure to create new threads if you have another problem.
okay its work
i have question
how to set it so that messages in the chat are a big message, meaning it looks like in the picture? and this is the section for it right_click_commands:
- '[sound] ENTITY_EXPERIENCE_ORB_PICKUP'
- '[console] tellraw %player_name% {"text":"Kliknij tutaj by wyświetlić topkę!","color":"green","underlined":true,"clickEvent":{"action":"open_url","value":"http://nesv.pl:25625/leaderboard"}}'
- '[close]'