#Item Requirement

1 messages · Page 1 of 1 (latest)

vestal orchid
#

I followed what I thought was needed for an Item requirement for a menu but it hasnt worked yet. Tried a few ways with different items but it wont accept that I have the item in my inventory.

    material: potato
    data: 0
    slot: 13
    enchantments:
    - DURABILITY;1 
    hide_enchantments: true
    display_name: "&#A05E21&lPotato Shop"
    lore:
      - ""
      - "&f&lɪᴛᴇᴍꜱ ɪɴ ᴄᴀᴛᴇɢᴏʀʏ"
      - "&7Potato&7, Enchanted Potato&7,"
      - "&7Baked Potato"
      - ""
      - "&e&lʟᴇꜰᴛ ᴄʟɪᴄᴋ&7 ᴛᴏ ᴠɪᴇᴡ ꜱᴇʟʟ ᴏᴘᴛɪᴏɴꜱ"
      - "&c&lʀɪɢʜᴛ ᴄʟɪᴄᴋ&7 ᴛᴏ ᴠɪᴇᴡ ʙᴜʏ ᴏᴘᴛɪᴏɴꜱ"
      - ""
    left_click_requirement:
      requirements:
        stuff:
          type: 'has item'
          material: 'POTATO'
          amount: 1
          modeldata: 0
          glow: true
          name: "&eEnchanted Potato"
      deny_commands:
      - '[message] &c&lSERVER &8» &7You &cdo not &7have any &eEnchanted Potatoes &7to sell.'
    left_click_commands:
    - '[player] sellpotato' 
    - '[close]'```
#

(@ me with response if have a fix or idea to fix)

vast torrent
#

@vestal orchid glow: true doesn't exist

#

If you need to check enchantments you can use the checkitem expansion

vestal orchid
#

Was just following another one I saw on here, but before adding that it didn't do it either

vast torrent
#

But where is this potato from?

vestal orchid
#

Potato would be a custom craft from ceh

vast torrent
#

Can you hold it and type /data get entity @s SelectedItem

#

send a picture of the response here

#

?imgur

analog aspenBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/upload to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

vestal orchid
#

yeah one second

vast torrent
#

is it enchanted?

vestal orchid
#

It should be but Im not sure how to make it enchanted with no lore

#

So as of now, no

vast torrent
#

Well that's gonna change what you need to setup in dm

#

as of now

    left_click_requirement:
      requirements:
        stuff:
          type: 'has item'
          material: 'POTATO'
          amount: 1
          name: "&eEnchanted Potato"
          deny_commands:
          - '[message] &c&lSERVER &8» &7You &cdo not &7have any &eEnchanted Potatoes &7to sell.'
    left_click_commands:
    - '[player] sellpotato' 
    - '[close]'

this should work

vestal orchid
#

Im working on getting it enchanted, once i do how do i change it?

vestal orchid
vestal orchid
vast torrent
#

weird, it should've

#

?checkitem

analog aspenBOT
#
FAQ Answer:

Command:

/papi ecloud download checkitem
/papi reload

Manual Download:
Download
Click here for more information on how to use the CheckItem Expansion.

vast torrent
#

Download the checkitem expansion and try

type: string equals
input: '%checkitem_mat:potato,amt:1,nameequals:&eEnchanted Potato,enchantments:EFFICIENCY=1%'
output: 'yes'

test it with /papi parse me %checkitem_mat:potato,amt:1,nameequals:&eEnchanted Potato,enchantments:EFFICIENCY=1%

vestal orchid
#

Responds with Yes

void stratus
vast torrent
#

@vestal orchid Did you try it in dm yet?

#

prob would've gotten an error as tran pointed out I put ` not '

vestal orchid
#

I didnt copy and paste, i just re-wrote it when it was shown

vast torrent
#

response is yes not Yes

vestal orchid
#

I believe it was capital but i could've been wrong

vast torrent
#

you sent a picture

vast torrent
vestal orchid
#

ye, forgot about it just went off memory

vast torrent
#

i mustve misread

#

my b

vestal orchid
#

I edited it with what you sent previously just didnt copy paste it

vast torrent
#

Oh you didn't do checkitem at all

vast torrent
#

it's edited to be correct now as well (no `)

#

put that instead of your current requirement

vestal orchid
#

So replace Potato for '%checkitem_mat:potato,amt:1,nameequals:&eEnchanted Potato,enchantments:EFFICIENCY=1%'

#

Ye it worked!

#

Appreciate you both, working with items instead of permissions is much different than expected

vestal orchid
#

@vast torrent sorry to ping, do you know how to make /clear take the potato? I've tried /clear Flogna potato 1 1 {display:{Name:"&eEnchanted Potato"}}

#

or is there another method I can use?

vast torrent
#

you have %checkitem_mat:potato,amt:1,nameequals:&eEnchanted Potato,enchantments:EFFICIENCY=1%

#

to remove that item

#

parse this %checkitem_remove_mat:potato,amt:1,nameequals:&eEnchanted Potato,enchantments:EFFICIENCY=1%

#
click_commands:
- '[placeholder] %checkitem_remove_...'
vestal orchid
#

Thank you :)

vast torrent
#

but i do recommend avoiding pinging 😉

#

If we're around we'll probably see the message either way

vestal orchid
#

Sounds good, sorry about that :P

vast torrent
#

especially in these forum threads, I have to manually unfollow to remove it

#

all good, I had this open seeing you type already so

#

:L

vestal orchid
#

It seems to not have worked with the left_click commands

#

but it worked with the parse

vast torrent
#

?paste

analog aspenBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use our paste bin:
(we prefer it over pastebin.com)
HelpChat Paste - How To Use

vestal orchid
#

I can't see anything wrong with it compared to how it was done unless I need a player name placeholder

vast torrent
#

oh boy

#

your requirement is not correct

#

but the remove placeholder part looks fine

vestal orchid
#

It worked earlier when we got it above

#

I don't believe i changed anything with the requirement

vast torrent
#

what you just sent makes no sense

#

look at that

#

and use it

vast torrent
#

try that out and see how it works

vestal orchid
#

It runs test just not taking the potato now

vast torrent
#

you get the messagE?

vestal orchid
#

Yes it's saying "Test"in my chat

vast torrent
#

hmm, did you just download checkitem or did you have it before?

#

wait, but you said it worked when parsed?

vestal orchid
#

yes it worked when it parsed

vast torrent
#

like /papi parse me %checkitem_remove... removes the item
?

vestal orchid
#

and this is the first time with checkitem

#

/papi parse Flogna %checkitem_remove_mat:potato,amt:1,nameequals:&eEnchanted Potato,enchantments:EFFICIENCY=1% did remove it

#

and still does

vast torrent
#

what dm version

#

what mc version?

vestal orchid
#

1.13.3-Release on 1.16.5

vast torrent
#

update

#

1.13.6 now

#

if you don't want to

#

you can do [console] isntead of [placeholder] but it will output uknown command to your console

#

:L

vestal orchid
#

I think for my home server I had to stay back, aren't newer versions on java 17 or am I thinking of an different plugin

vast torrent
#

java 11+

#

but why not upgrade

#

i just use java 17 for the newer versions

vestal orchid
#

honestly, not sure why I havent updated

vast torrent
#

p easy

#

don't gotta get rid of old java

#

even

#

if u need it

vestal orchid
#

Yeah that's why I stayed back on that older version, I just didn't update java

vast torrent
#
Title Plugin Testing
"C:\Program Files\Java\jdk-17\bin\java" -Dfile.encoding=UTF8 -Xms512m -Xmx4096m -jar spigot.jar nogui
pause
#

that's my start bat to run it with java 17 specifically

#

because java8 is still my java home

#

do i know why? no 🤷‍♂️

vestal orchid
#

lol if I just copy that to my run file it'll run in 17 once I download it?

vast torrent
#

maybe thonking

#

you could also find your java directory if not

#

lol

vestal orchid
#

I've never been a big worker behind the scenes till this year so most of the configurations and such are new

vast torrent
#

it'll be soemwhat close

#

if you want to replace your java home variable it's in your environment variables

#

idk if you've ever been in there

vestal orchid
#

not once lol

vast torrent
#

well uh

#

typing "environ" will start to bring up edit system environment variables

#

edit those, click environment variables, your JAVA_HOME is the default java path that is used when you just type java -jar spigot.jar

#

so you don't gotta type "C:\Program Files\Java\jdk-17\bin\java" -jar spigot.jar

vestal orchid
#

This is what my old bat file was ````@echo off
java -Xms2G -Xmx2G -XX:+UseG1GC -jar spigot-1.16.5.jar --nogui
pause```

vast torrent
#

it might set itself if you uninstall java8 and install java17 tho, but idrk

#

cause i have both

vast torrent
vestal orchid
#

I just finished install java 17

vast torrent
#

if you go to "C:\Program Files\Java\jdk-17\bin\" is it there

vestal orchid
#

So if I'm following you correctly, this is right?

vast torrent
#

ye

#

idk if yoou need to restart for it to take effect, but try it

#

see what happens

vestal orchid
#

then change my bat file to ````C:\Program Files\Java\jdk-17\bin\java" -Dfile.encoding=UTF8 -Xms512m -Xmx4096m -jar spigot.jar nogui
pause```

vast torrent
#

no

#

then you can just do java -jar spigot.jar

#

oor whatever you did before

#

nothing changes

vestal orchid
#

oh so i dont need to hcnage

#

ok cool

vast torrent
#

that's why you set the variable

#

so you can just use java instead of "C:\Program Files\Java\jdk-17\bin\java"

vestal orchid
#

Says only java 16 is supported so probably have to restart

vast torrent
#

ah, get java 16 ig

#

i think that's why i keep java8 as my home

#

and just specify 17 for newer ones

vestal orchid
#

interesting they want me to make an account for 16

#

but not 17

vast torrent
vestal orchid
#

Ok that fixed everything

#

I appreciate you helping with not only that but my Java lol