#Need help with a kit menu
1 messages · Page 1 of 1 (latest)
menu_title: "IRONKIT"
size: 36
register_command: true
items:
'Item-1':
material: IRON_HELMET
slot: 0
'Item-2':
material: IRON_CHESTPLATE
slot: 1
'Item-3':
material: IRON_LEGGINGS
slot: 2
'Item-4':
material: IRON_BOOTS
slot: 3
'Item-5':
material: IRON_SWORD
slot: 4
'Item-6':
material: IRON_AXE
slot: 5
'Item-7':
material: IRON_PICKAXE
slot: 6
'Item-8':
material: crossbow
slot: 7
'Item-9':
material: arrow
amount: 32
slot: 8
'Item-10':
material: splash_potion
display_name: '&fSplash Potion of Healing'
slot: 9
potion_effects:
- INSTANT_HEALTH;0;0
'Item-11':
material: splash_potion
display_name: '&fSplash Potion of Healing'
slot: 10
potion_effects:
- SPEED;1800;1
'Item-12':
material: LIGHT_BLUE_BED
slot: 11
'Item-13':
material: ender_pearl
amount: 2
slot: 12
'Item-14':
material: GOLDEN_APPLE
amount: 3
slot: 13
'Item-15':
material: cooked_porkchop
amount: 16
slot: 14
#INCEPUTUL DE SYNTAXA
'kit-claim-available':
material: GREEN_STAINED_GLASS_PANE
slots:
- 32-35
display_name: '&a&lClaim ADMIN kit'
lore:
- '&7Primește kitul pentru rangul &fADMIN&7.'
click_commands:
- '[close]'
- '[player] playerkits claim ADMIN'
condition: 'has_admin'
'kit-claim-unavailable':
material: RED_STAINED_GLASS_PANE
slots:
- 32-35
display_name: '&c&lNu ai acces la kit'
lore:
- '&7Acest kit este disponibil doar pentru rangul &fADMIN&7.'
click_commands:
- '[message] &8&l[&c&l!&8&l] &fAcest kit este disponibil doar pentru &cADMIN&f!'
- '[close]'
condition: 'not_admin'
conditions:
has_admin:
type: 'has permission'
condition: 'group.admin'
not_admin:
type: '!has permission'
condition: 'group.admin'
seems like a indentation problem in 'not_admin' condition
i modified the code a bit
'kit-available':
material: GREEN_STAINED_GLASS_PANE
slots:
- 32-35
display_name: '&a&lClaim ADMIN kit'
lore:
- '&7Primește kitul pentru rangul &fADMIN&7.'
click_commands:
- '[close]'
- '[player] playerkits claim IRON'
view_requirement:
requirements:
has_perm:
type: 'has permission'
permission: 'group.admin'
output: "yes"
priority: 0
'kit-unavailable':
material: RED_STAINED_GLASS_PANE
slots:
- 32-35
display_name: '&c&lNu ai acces la kit'
lore:
- '&7Acest kit este disponibil doar pentru rangul &fADMIN&7.'
click_commands:
- '[message] &8&l[&c&l!&8&l] &fAcest kit este disponibil doar pentru &cADMIN&f!'
- '[close]'
priority: 1
not it works
it sems like so
'kit-available':
material: GREEN_STAINED_GLASS_PANE
slots:
- 27-35
display_name: '&a&lClaim ADMIN kit'
lore:
- '&7Primește kitul pentru rangul &fADMIN&7.'
click_commands:
- '[close]'
- '[player] playerkits claim IRON'
view_requirement:
requirements:
has_perm:
type: 'has permission'
permission: 'group.admin'
output: "yes"
priority: 1
'kit-unavailable':
material: RED_STAINED_GLASS_PANE
slots:
- 27-35
display_name: '&c&lNu ai acces la kit'
lore:
- '&7Acest kit este disponibil doar pentru rangul &fADMIN&7.'
click_commands:
- '[message] &8&l[&c&l!&8&l] &fAcest kit este disponibil doar pentru &cADMIN&f!'
- '[close]'
priority: 2
Now how do i make a new item to show when the kit is on cooldown with this placeholder "%playerkits_cooldown_IRON%"?
@floral oar we have an example for how to do this with Essentials Kits. I think you can modify it to work for PlayerKits.
https://wiki.helpch.at/helpchat-plugins/deluxemenus/example-gui-menus#kits
Also, the "has permission" requirement does not need output. You can use it like this:
view_requirement:
requirements:
has_perm:
type: 'has permission'
permission: 'group.admin'```
Yes. You can use any placeholder as requirement.
There are requirement types such as string equals for string comparison and then also math comparators such as == >= > <= and <
those work with numbers
In the example I sent you can look at item kit_tools_cooldown to see how the placeholder is used as a requirement
kit_not_ready:
type: 'placeholder'
placeholder: '%playerkits_cooldown_IRON%?
equals: 'NO'
output: 'yes'
This is something i tried a few hours ago but didn't work ill take a look in the example guis
is this compatible with playerkits plugin?
kit_tools_cooldown':
material: ORANGE_CONCRETE
slot: 13
priority: 2
update: true
view_requirement:
requirements:
permission:
type: has permission
permission: essentials.kits.tools
available:
type: string equals ignorecase
input: '%essentials_kit_is_available_tools%'
output: 'no'
display_name: ' &c&lTools '
lore:
- ''
- '&8• &7Kit: &cTools'
- '&8• &7Status: &cOn Cooldown'
- '&8• &7Available In: &c%essentials_kit_time_until_available_tools%'
- ''
click_commands:
- '[refresh]'
Bc i see a placeholder input '%essentials_kit_is_available_tools%' but playerkits only has 2 placeholders
so the easier thing will be to use essentials kit
You don't need to. What does %playerkits_cooldown_IRON% return?
What are the possible values?
Returns the current player cooldown for the specified kit. When the cooldown is ready, it will return this message from the messages.yml file: cooldownPlaceholderReady
cooldownPlaceholderReady i think
Can you try /papi parse me %playerkits_cooldown_IRON% with a kit that you have no cooldown for?
Just to be sure.
This is going to suck. Can you change the output to something else?
Or do you use this output in other places as well?
It would be a lot more easier if it returned a simple Ready with no color codes
or anything like that
i mean if im going to make a kit menu, do i really need Playerkits?
i think it would be much more reliable with essentials
right?
I am not sure how PlayerKits works. So I can't tell you for sure.
or will that get to complicated
playerkits makes kits with what you have in your inventory
and then has it's own UI
Oh. Well if you're going to make your own UI, I don't see a problem with using Essentials Kits instead
and you can edit the kits with their own UI, but a lot of server don't use it because they make their own UIs
yeah. So if im going to use Essentials everything i need to know is there from what i saw
Yeah it should be
thanks Blitz, if i have anymore problems do i make a new thread, or keep this one instead?