#One time use

1 messages · Page 1 of 1 (latest)

broken hedge
#

Hello,
Is there any possible way to make menu where a player could click on item that execute command only one time?

slate coral
#

You could require the user NOT to have a permission/meta value, then give it to them upon click

broken hedge
#

Oh okay I found what you mean, ok i’ll try it

slate coral
#
click_requirement:
  requirements:
    onetime:
      type: '!has meta'
      key: 'item1'
      meta_type: 'INTEGER'
      value: 1
click_commands:
- '[meta] add item1 INTEGER 1'
#

might work, though not 100% sure if add will work if the meta doesn't exist yet, but you can just use set instead

#

I used add as a little bit of example making a "10 times use" item

broken hedge
#

I know that luckperms use meta will this add meta to the player via [meta] add ?

slate coral
#

luckperms meta and the meta dm uses will be separate, dm has their own tag on it

#

if you use luckperms for meta, it will work too

broken hedge
#

Oh

slate coral
#

so really it's like DELUXEMENUS-onetime-item1 or something (don't quote me)

broken hedge
slate coral
#

the idea of this is they can only click it if the value is less than 1 <1
so once they buy it, the value gets set to 1, then they can't click it again

#

essentially you could store how many they buy in the meta, just by adding it

#

and the maximum value they are allowed to by, is determined by the value: 1 in the requirement

broken hedge
#

Oh ok i get it

#

Well thanks I’ll try to do that when I have time

broken hedge
slate coral
#

?dm-multireq

queen daggerBOT
#
FAQ Answer:
click_requirement:
  requirements:
    requirement1:
      type: TYPE
    requirement2:
      type: TYPE
    requirement3:
      type: TYPE
    requirement4:
      type: TYPE

More info on the Wiki

slate coral
#

@broken hedge this

broken hedge
#

Is there way to make clickable text when using [message] ? cathi

broken hedge
#

😮 how

wary jasper
#

[message] put whatever you want here, you also can use color code and hex code

hard belfry
#

There should be [minimessage] @broken hedge

broken hedge
#

Cause i know what that is

broken hedge
#

With that?

shut robin
broken hedge
shut robin
#

yes

broken hedge
#

Ok