Hello my friends, good evening. I would like to know how I can create a menu where the player only has permission and money to access the kit if they actually have enough funds to purchase it. The plugin I'm using is EssentialsX, named PvP Kit. I'll be honest, because my entire menu is created via GPT chat.
The problem that is happening is the following, even though I have no op and no balance, it shows the message saying that I bought the kit without having bought it and it is not showing in any way the message that the player has no balance.
'pvp':
material: IRON_SWORD
slot: 39
display_name: "&bKit PvP"
lore:
''
'&fClique esquerdo: &7Comprar Kit PvP'
'&fClique direito: &7Visualizar conteúdo'
''
'&7Valor: &eR$ 4.000 &7Coins'
left_click_requirement: saldo_pvp
left_click_commands:
'[console] money take %player_name% 4000'
'[console] lp user %player_name% permission set essentials.kit.pvp true'
'[delay] 5'
'[player] kit pvp'
'[delay] 5'
'[console] lp user %player_name% permission unset essentials.kit.pvp'
'[message] &aVocê comprou o Kit PvP por 4.000 coins!'
'[sound] ENTITY_PLAYER_LEVELUP'
'[close]'
left_click_requirement_failed_commands:
'[message] &cVocê não tem saldo suficiente para comprar esse kit.'
'[sound] BLOCK_NOTE_BLOCK_BASS'
right_click_commands:
'[openguimenu] pvp_visualizacao'
requirements:
saldo_pvp:
type: money
amount: 4000
comparison: '>='
delux menus
pvp:
delay: 0
cost: 4000
permission: essentials.kit.pvp
items:
iron_helmet 1
iron_chestplate 1
iron_leggings 1
iron_boots 1
iron_sword 1
shield 1 basecolor:16383998
golden_apple 10
essentialsx