#DeluxeMenu 1 time click

1 messages · Page 1 of 1 (latest)

scenic raft
#

Is it possible to click on an item only once?
This is because I'm setting up a shops using this plugin and I wanted to sell a "starter pack"

  'starter_pack':
    material: PAPER
    nbt_int: CustomModelData:10259
    slot: 22
    display_name: "&aStarter Pack"
    lore:
    - '&7Want to start using this pack?'
    - '&7You need to buy the starter pack first!'
    - ''
    - '&7What you get:'
    - '&5. &7Normal Effect'
    - ''
    - "&7Price: &f75 &ePoints"
    - '&2[!] &aLeft-Click to purchase!'
    left_click_requirement:
      requirements:
        anything_here:
          type: '>='
          input: '%dercoins_points%'
          output: '75'
      deny_commands:
      - '[message] &7You need &c75 Points &7to buy this product.'
    left_click_commands:
      - '[console] dercoins withdraw %player_name% points 75'
      - '[message] &aPurchase successful.'

If you could exemplify how to use like I did, it would be fantastic.
Thank you in advance.

rocky fractal
#

You could give the player a permission starterkit.claimed and use that in a view/click requirement to deny them from claiming again

tame rose
#

The same way you did with dercort points but with has permission

rocky fractal
#
    left_click_requirement:
      requirements:
        anything_here:
          type: '>='
          input: '%dercoins_points%'
          output: '75'
          deny_commands:
          - '[message] &7You need &c75 Points &7to buy this product.'
        not_claimed:
          type: '!has permission'
          permission: 'starterkit.claimed'
          deny_commands:
          - '[message] &7You already bought this.'
    left_click_commands:
      - '[console] dercoins withdraw %player_name% points 75'
      - '[message] &aPurchase successful.'
      - '[givepermission] starterkit.claimed'
#

@scenic raft

scenic raft
# rocky fractal ```yml left_click_requirement: requirements: anything_here: ...

thank you for the reply
Although, this doesn't work


  'starter_pack':
    material: PAPER
    nbt_int: CustomModelData:10259
    slot: 22
    display_name: "&aStarter Pack"
    lore:
    - '&7Want to start using particle effects?'
    - '&7You need to buy the starter pack first!'
    - ''
    - '&7What you get:'
    - '&5. &7Underwater Particle'
    - '&5. &7Normal Effect'
    - '&5. &7Max &f1 &7effect at a time!'
    - ''
    - "&7Price: &f75 &ePoints"
    - '&2[!] &aLeft-Click to purchase!'
    left_click_requirement:
      requirements:
        anything_here:
          type: '>='
          input: '%dercoins_points%'
          output: '75'
      deny_commands:
      - '[message] &7You need &c75 Points &7to buy this product.'
      not_claimed:
        type: 'has permission'
        permission: 'starterkit.claimed'
        deny_commands:
        - '[message] &7You already bought this.'
    left_click_commands:
      - '[console] dercoins withdraw %player_name% points 75'
      - '[console] lp user %player_name% permission set playerparticles.particles.max.1'
      - '[console] lp user %player_name% permission set playerparticles.style.normal'
      - '[console] lp user %player_name% permission set playerparticles.effect.underwater'
      - '[givepermission] starterkit.claimed'
      - '[message] &aPurchase successful.'
#

please do ping me back ❤️

rocky fractal
#

your indentation is off

#

check your requirements compared to mine @scenic raft

#

Also, you do not have to use [givepermission], I see you have luckperms, you can use that

scenic raft
#

I did notice that

rocky fractal
#

it was just example

#

also you have type: 'has permission'

#

you want type: '!has permission'

#

they can only click it if they DON'T have the permission

scenic raft
#

it was working? 🤔

#

xD

#

this is the current config:


  'starter_pack':
    material: PAPER
    nbt_int: CustomModelData:10259
    slot: 22
    display_name: "&aStarter Pack"
    lore:
    - '&7Want to start using particle effects?'
    - '&7You need to buy the starter pack first!'
    - ''
    - '&7What you get:'
    - '&5. &7Underwater Particle'
    - '&5. &7Normal Effect'
    - '&5. &7Max &f1 &7effect at a time!'
    - ''
    - "&7Price: &f75 &ePoints"
    - '&2[!] &aLeft-Click to purchase!'
    left_click_requirement:
      requirements:
        anything_here:
          type: '>='
          input: '%dercoins_points%'
          output: '75'
          deny_commands:
          - '[message] &7You need &c75 Points &7to buy this product.'
        not_claimed:
          type: '!has permission'
          permission: 'starterpack.claimed'
          deny_commands:
          - '[message] &7You already bought this.'
    left_click_commands:
      - '[console] dercoins withdraw %player_name% points 75'
      - '[console] lp user %player_name% permission set playerparticles.particles.max.1'
      - '[console] lp user %player_name% permission set playerparticles.style.normal'
      - '[console] lp user %player_name% permission set playerparticles.effect.underwater'
      - '[console] lp user %player_name% permission set playerparticles.gui'
      - '[console] lp user %player_name% permission set starterpack.claimed'
      - '[message] &aPurchase successful.'
rocky fractal
#

and what's happening

scenic raft
#

are you sure it requires the ! ?

#

I didn't use it and he couldn't buy it xD

rocky fractal
#

you are specifically wanting the player to be able to click it ONLY if they DO NOT already have the permission they receive for clicking it

#

So yes, you need the !

scenic raft
#

wouldn't this be much easier as a "click-once" ? xD

rocky fractal
#

There is no such thing as click-once

scenic raft
rocky fractal
#

This is how you would make it

scenic raft
#

sorry for so many questions

rocky fractal
scenic raft
#

truly want to understand

rocky fractal
scenic raft
#

thank you!