#listing requirements

1 messages · Page 1 of 1 (latest)

coral nymph
#

Hello, how do i list more than one output for view_requirements?

      requirements:
        test:
          type: string equals
          input: '%luckperms_groups%'
          output: 'premium, deluxe'```
languid venture
coral nymph
#

So player to be or premium or deluxe

languid venture
coral nymph
#

Sequential

languid venture
#

Which rank is the lower one?

coral nymph
#

But if I would include all the ranks half of the would be complitely different

languid venture
coral nymph
#

Player

languid venture
coral nymph
#

Premium

languid venture
#

If you've setup your inheritance in LuckPerms correctly, I think you can do a permission check for group.premium.

coral nymph
#

I use displayname.premium

languid venture
#

What do you mean? I'm simply referring to the group permissions. When you're in a group, you'll have the permission group.<group_name> and when another group inherits permissions from another group, it should also have group.<inherited group name>.

#

So in your case, Deluxe will have group.premium and so will Premium. With that, you can just check if the player has group.premium.

#

Make sense?

coral nymph
#

yes, but what if I want to list ones that don't inhert

#

Like admin

languid venture
#

Will admins be opped or not?

#

Or will they have * permission node?

coral nymph
#

Yes

languid venture
#

Then they will automatically get all permissions, including group.xxxx.

coral nymph
#

What about like mods

languid venture
#

Are you wanting mods to meet this view requirement?

coral nymph
#

Yes too

languid venture
#

Are these Premium and Deluxe ranks paid ranks or acquired via some ingame method?

#

By paid ranks, I mean buyable via a Tebex store or similar.

coral nymph
#

Paid

languid venture
#

Are you wanting mods to get the paid rank perks or do you want them to have to buy the ranks too?

coral nymph
#

Well I am actually making a menu so you could by them with donate coins

languid venture
coral nymph
#

Ok

languid venture
#

So do you want mods to automatically get the rank perks or do you want them to have to buy it too?

coral nymph
#

I want them to not be able to buy ranks

languid venture
#

Will they get the perks or not?

coral nymph
#

No

languid venture
coral nymph
#

Ok thanks

#

I will try it soon

coral nymph
#

i tried it and it just says in console that it can't find permission requirements

#

@languid venture

languid venture
coral nymph
#
    slot: 21
    priority: 1
    material: CHAINMAIL_CHESTPLATE
    display_name: '&#f2eb05&lV&#f9f203&li&#fff801&lp'
    view_requirement:
      requirements:
        buy_vip1:
          type: string equals
          input: '%luckperms_groups%'
          output: 'player'
    click_commands:
      - '[message] Test1'
    
  'buy_vip2':
    slot: 21
    priority: 2
    material: CHAINMAIL_CHESTPLATE
    display_name: '&#f2eb05&lV&#f9f203&li&#fff801&lp'
    view_requirement:
      requirements:
        buy_vip2:
          type: string equals
          input: '%luckperms_groups%'
          output: 'vip'
    click_commands:
      - '[message] Test2'
    
  'buy_vip3':
    slot: 21
    priority: 3
    material: CHAINMAIL_CHESTPLATE
    display_name: '&#f2eb05&lV&#f9f203&li&#fff801&lp'
    view_requirement:
      requirements:
        buy_vip3:
          type: has permissions
          permissions: group.premium
    click_commands:
      - '[message] Test3'```
coral nymph
#

@languid venture

jovial glacier
#

you renamed the items?

languid venture
jovial glacier
#

just do

permission: group.premium```

not 
```type: has permissionS
permissionS: group.premium
coral nymph
#

ok

jovial glacier
#

otherwise, if you want more then 1 permission, do this

type: has permissions
permissions:
  - 'group.premium'
  - 'other.permission'
coral nymph
#

i changed it to has permission

#

wait a second

jovial glacier
#

can you show the full file? the error says something about item buy_premium1/2/3 not buy_vip

coral nymph
#

one second

jovial glacier
#

take your time

coral nymph
#
  - donate
  - don
register_command: true
size: 53
menu_title: '&8Donate menu'

items:
  'buy_vip1':
    slot: 21
    priority: 1
    material: CHAINMAIL_CHESTPLATE
    display_name: '&#f2eb05&lV&#f9f203&li&#fff801&lp'
    view_requirement:
      requirements:
        buy_vip1:
          type: string equals
          input: '%luckperms_groups%'
          output: 'player'
    click_commands:
      - '[message] test1'
    
  'buy_vip2':
    slot: 21
    priority: 2
    material: CHAINMAIL_CHESTPLATE
    display_name: '&#f2eb05&lV&#f9f203&li&#fff801&lp'
    view_requirement:
      requirements:
        buy_vip2:
          type: string equals
          input: '%luckperms_groups%'
          output: 'vip'
    click_commands:
      - '[message] test2'
    
  'buy_vip3':
    slot: 21
    priority: 3
    material: CHAINMAIL_CHESTPLATE
    display_name: '&#f2eb05&lV&#f9f203&li&#fff801&lp'
    view_requirement:
      requirements:
        buy_vip3:
          type: has permission
          permission: 'group.premium'
    click_commands:
      - '[message] test3'

  'buy_premium1':
    slot: 22
    priority: 3
    material: CHAINMAIL_CHESTPLATE
    display_name: 'premium1'
    view_requirement:
      requirements:
        buy_premium1:
          type: has permission
          permission: 'group.default'
    click_commands:
      - '[message] test4'
    
  'buy_premium2':
    slot: 22
    priority: 2
    material: CHAINMAIL_CHESTPLATE
    display_name: 'premium2'
    view_requirement:
      requirements:
        buy_premium2:
          type: string equals
          input: '%luckperms_groups%'
          output: 'premium'
    click_commands:
      - '[message] test5'
    
  'buy_premium3':
    slot: 22
    priority: 1
    material: CHAINMAIL_CHESTPLATE
    display_name: 'premium3'
    view_requirement:
      requirements:
        buy_premium3:
          type: has permission
          permission: 'group.deluxe'
    click_commands:
      - '[message] test6'
jovial glacier
#

oh there we are. let me take a look

#

does this config work besides the warn in console?

#

@coral nymph

coral nymph
#

nope

#

it displays test3 and test6

#

when i have premium

jovial glacier
#

are you sure the priority is set right?

coral nymph
#

i think it is

jovial glacier
#

what do you want to achive when having premium

coral nymph
#

for slot 21 when i have premium it saying test3 and for slot 22 it saying test5

jovial glacier
#

can you write
/papi parse me %luckperms_groups%

#

and show me what it returns

coral nymph
jovial glacier
#

only?

coral nymph
#

yea

jovial glacier
#

can you try and switch 'buy_premium3' and buy_premium1 prioritys

coral nymph
#

ok

#

still test6

jovial glacier
#

is the name of the item premium3

#

or just the message is different from what you put

coral nymph
#

buy_premium3

jovial glacier
#

the display name not the id of the item

#

when you put your mouse on the item in the menu

#

what is the item name

coral nymph
#

let me show you

jovial glacier
#

ok preimum 3

#

damn

#

can you send me the texture pack for the slots later?

coral nymph
#

sure

jovial glacier
#

man...

#

tnx

#

anyway

coral nymph
jovial glacier
#

did you do /dm reload?

coral nymph
#

yes

#

always

#

do you want me to try again?

jovial glacier
#

are you OP ?

#

😭

coral nymph
#

yes

#

i see

jovial glacier
#

can you try and deop yourself

#

😄

#

and then see

coral nymph
#

it works