#Grade shop deluxemenus

1 messages · Page 1 of 1 (latest)

distant haven
#

Hi, I’m having several issues setting up a rank shop with DeluxeMenus and LuckPerms:

  • The item for the "Roi" (King) rank (Nether Star) doesn’t show up in the menu, even though the YAML config is correct.

  • Players can buy the same rank multiple times, since the only condition I was checking was their primary group.

  • Players can buy higher ranks without having the lower ones unlocked first, since the conditions don’t reliably detect if they purchased the previous ranks.

I want the following behavior:

Players must purchase the ranks in order (e.g., must have "Seigneur" before buying "Roi").
Once a rank is bought, it stays "unlocked" forever, even if the player changes their primary group later. Players shouldn’t be able to buy the same rank again.
All ranks should stay assigned cumulatively (so that players keep all permissions).

If you have suggestions or examples of a clean configuration (YAML) that does this, I’d really appreciate the help.

Thanks !

#

ping me so I see your message please ^^

mental stirrup
# distant haven Here is my config:

I suggest you set up a LuckPerms track for these ranks. When a user buys a rank, you give it using command /lp user <user> promote <track>. Then you check the next rank on track using %luckperms_next_group_on_track_TRACK%. And you allow buy if highest rank on track is the same as the one they want to buy.

distant haven
#

Okay thanks, I'll try this tomorrow

distant haven
#

There is still 2 problems now:
Players can buy the same rank multiple times

Players can buy higher ranks without having the lower ones unlocked first

mental stirrup
#
      not_already_has_rank:
          type: 'has permission'
          input: 'group.roi'
          negate: true

This is not how you negate requirements. This is how you do it:

      not_already_has_rank:
          type: '!has permission'
          input: 'group.roi'
distant haven
#

But player can still buy higher ranks without having the lower ones.

distant haven
#

It don't work

#

i can buy any rank multiple time

#

and I can buy higher ranks without having the lower ones.

mental stirrup
#

First of all, make sure you're not op when testing the menus

#

Second of all, I didn't notice at first, but there's another issue with your permission requirements

#
      not_already_has_rank:
          type: '!has permission'
          input: 'group.roi'

should be

      not_already_has_rank:
          type: '!has permission'
          permission: 'group.roi'
#

Instead of input, it should be permission

distant haven
#

oh okay

#

for the ' and " is there a issue ?

mental stirrup
#

Oh, I missed the ' at the end

#

You do need it.

distant haven
#

np

mental stirrup
#

It doesn't matter if it is " or '

#

Both work, but not together

distant haven
#

the menu load so we're good right ?

mental stirrup
#

So you can either use 'test' or "test"

mental stirrup
distant haven
#

now only the button I can buy is visible, but I need to close and re-open the menu to see the new button. If I don't close the menu I can buy the rank multiple time. Is there a way to close it when I buy a rank ?

#

And is there a way to see the button if we don't have enough money ? Because if you can't afford the rank you can't even see it exist

mental stirrup
#

It will refresh the menu

distant haven
#

if you can't afford you can't open the menu*

mental stirrup
#

or you can show a different item if the requirements are not met

#

I'll give an example

distant haven
#

okay thanks you

mental stirrup
#
  grade_chevalier_not_enough_money:
    slot: 11
    priority: 3
    material: DIAMOND_SWORD
    display_name: "&bGrade Chevalier"
    lore:
      - "&7Deviens un puissant Chevalier."
      - "&fPrix: &e45,000$"
      - ""
      - "&cNOT ENOUGH MONEY!"
    view_requirement:
      requirements:
        has_money:
          type: "<"
          input: "%vault_eco_balance_fixed%"
          output: 45000
  grade_chevalier_not_rank:
    slot: 11
    priority: 2
    material: DIAMOND_SWORD
    display_name: "&bGrade Chevalier"
    lore:
      - "&7Deviens un puissant Chevalier."
      - "&fPrix: &e45,000$"
      - ""
      - "&cNO RANK!"
    view_requirement:
      requirements:
        has_money:
          type: ">="
          input: "%vault_eco_balance_fixed%"
          output: 45000
  grade_chevalier:
    slot: 11
    priority: 1
    material: DIAMOND_SWORD
    display_name: "&bGrade Chevalier"
    lore:
      - "&7Deviens un puissant Chevalier."
      - "&fPrix: &e45,000$"
      - ""
      - "&eClique pour acheter."
    left_click_commands:
      - "[console] eco take %player_name% 45000"
      - "[console] lp user %player_name% parent add chevalier"
    view_requirement:
      requirements:
        has_money:
          type: ">="
          input: "%vault_eco_balance_fixed%"
          output: 45000
        has_previous_rank:
          type: "has permission"
          permission: "group.villageois"
        not_already_has_rank:
          type: "!has permission"
          permission: "group.chevalier"
#

Something like this

#

You have 3 items in the same slot.

1 is for when the player has the money and the rank necessary so he can buy it
2 is for when the player does not have the rank necessary
3 is for when the player has the rank necessary but not the money

distant haven
#

I did everything but

distant haven
mental stirrup
distant haven
mental stirrup
#

yes

distant haven