#How do i create menu accessible only when you have no items in inventory?

1 messages · Page 1 of 1 (latest)

neon summit
#

Thought could do this with req's but i dont really want to create thousands of !has item req's

dense radish
#

something like

open_requirement:
 requirements:
   item:
     type: has item
     material: dirt
     amount: 1
#

oh no items

#

lol

#

still open requirement

neon summit
#

i understand that

dense radish
#

u can use the checkitem expansion to check if every slot is empty

neon summit
#

uf

dense radish
#

idk tbh if there is a placeholder for that but i ll take a look later

neon summit
#

i really really need this, i need arena where there will be no items

dense radish
#
    open_requirement:
      requirements: 
        slots:
          type: "=="
          input: "%player_empty_slots%" 
          output: "36"

try this @neon summit

#

this checks how many empty slots a player has

#

36 is all empty [not armor/offhand] included

#

u need the player expansion btw

neon summit
#

where can i find it

dense radish
#

/papi ecloud download player

#

u need placeholderapi installed

#

and then do /papi reload

neon summit
#

ooh

#

you mean that

#

i have this one

dense radish
#

it's the most basic one 😛

neon summit
#

wait but how do i check armor then

#

and offhand

#

💀

dense radish
#

and for the armor slots use the checkitem expansion to check if there is an item in the armor's slots

neon summit
#

open_requirement:
requirements:
slots:
type: "=="
input: "%player_empty_slots%"
output: "36"
requirements:
slots:
type: has item
input: "%player_item_in_offhand%"
material: air
?

#

should it look like this? or....

dense radish
#

nah

dense radish
#

try this

neon summit
#

%player_armor_chestplate_data% ?

#

is this one right?

#

i mean do i have to uset this one placeholder

dense radish
#
    open_requirement:
      requirements: 
        slots:
          type: "=="
          input: "%player_empty_slots%" 
          output: "36"
        offhand:
          type: "=="
          input: "%player_item_in_offhand%"
          output: "AIR"
        helmet:
          type: "=="
          input: "%checkitem_inslot:39%"
          output: "no"
        chestplate:
          type: "=="
          input: "%checkitem_inslot:38%"
          output: "no"
        leggings:
          type: "=="
          input: "%checkitem_inslot:37%"
          output: "no"
        boots:
          type: "=="
          input: "%checkitem_inslot:36%"
          output: "no"

try this @neon summit

#

but make sure to download the checkitem expansion /papi ecloud download checkitem and then /papi reload

neon summit
#

thank you

#

let me see

neon summit
#

welp

#

this one doesnt work

neon summit
# dense radish ```yml open_requirement: requirements: slots: type:...

dunno why... here's my menu

open_command:
  - pvp
open_commands:
size: 9 
open_requirement:
  requirements: 
    slots:
      type: "=="
      input: "%player_empty_slots%" 
      output: "36"
    offhand:
      type: "=="
      input: "%player_item_in_offhand%"
      output: "AIR"
    helmet:
      type: "=="
      input: "%checkitem_inslot:39%"
      output: "no"
    chestplate:
      type: "=="
      input: "%checkitem_inslot:38%"
      output: "no"
    leggings:
      type: "=="
      input: "%checkitem_inslot:37%"
      output: "no"
    boots:
      type: "=="
      input: "%checkitem_inslot:36%"
      output: "no"
    deny_commands:
    - "[message] &c&lУ вас есть предметы в инвентаре!"  
items:
  1:
    material: hdb-40370
    data: 1
    slot: 4
    display_name: "&6Телепортация На Арену"
    lore:
    left_click_commands:
      - '[console] warps pvp %player_name%'
      - '[console] heal %player_name%' ```
dense radish
#

and whats wrong with it

neon summit
#

wait

#

i might be really dumb

#

give me a sec

#

cant i input deny_commands ?

#

wait

#

i actually cant use it at all

#

/pvp isnt working

dense radish
#

it works for me? :/

#

i mean the gui opens

#

but the issue is smth else

#

gimme a sec

#
menu_title: '&6&lАрена'
open_command:
  - pvp
size: 9 
open_requirement:
  requirements: 
    slots:
      type: "=="
      input: "%player_empty_slots%" 
      output: "36"
    offhand:
      type: "=="
      input: "%player_item_in_offhand%"
      output: "AIR"
    helmet:
      type: "=="
      input: "%checkitem_inslot:39%"
      output: "no"
    chestplate:
      type: "=="
      input: "%checkitem_inslot:38%"
      output: "no"
    leggings:
      type: "=="
      input: "%checkitem_inslot:37%"
      output: "no"
    boots:
      type: "=="
      input: "%checkitem_inslot:36%"
      output: "no"
  deny_commands:
    - "[message] &c&lУ вас есть предметы в инвентаре!"  
items:
  1:
    material: hdb-40370
    data: 1
    slot: 4
    display_name: "&6Телепортация На Арену"
    lore:
    left_click_commands:
      - '[console] warps pvp %player_name%'
      - '[console] heal %player_name%' 

try this @neon summit

#

u had the open_commands: twice

neon summit
#

algriht

dense radish
#
  • as an op u have permissions for every menu
#

and u bypass the limitations

neon summit
#

i know, because as op it worked

#

just not as a player

dense radish
#

it still has an issue give me a sec :/

#
menu_title: '&6&lАрена'
open_command:
  - pvp
size: 9 
open_requirement:
  requirements: 
    slots:
      type: string equals ignorecase
      input: '%player_empty_slots%' 
      output: '36'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 1'  
    offhand:
      type: string equals ignorecase
      input: '%checkitem_inslot:40%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 2'  
    helmet:
      type: string equals ignorecase
      input: '%checkitem_inslot:39%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 3'  
    chestplate:
      type: string equals ignorecase
      input: '%checkitem_inslot:38%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 4'  
    leggings:
      type: string equals ignorecase
      input: '%checkitem_inslot:37%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 5'  
    boots:
      type: string equals ignorecase
      input: '%checkitem_inslot:36%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 6'  
items:
  1:
    material: hdb-40370
    data: 1
    slot: 4
    display_name: '&6Телепортация На Арену'
    lore:
    left_click_commands:
      - '[console] warps pvp %player_name%'
      - '[console] heal %player_name%' 

this 99% works with no errors @neon summit

#

i added the deny commands per action so i can do the debugging

#

u can remove em if u want to

neon summit
#

let me seee

dense radish
#

also u can add register_commands: true

neon summit
#

sorry that you have to do it for me

dense radish
#

so the command will come up

#

nah its fine

neon summit
#

nope

dense radish
#

i like doing things in dm :d

neon summit
#

its not working actually

#

i tried

dense radish
#

;-;

neon summit
#

it breaks

#

every menu

#

ive done it with

#

no joke

#

its just not working

#

playin 1.19.3 let me see the version if you need it

dense radish
#
menu_title: '&6&lАрена'
open_command:
  - pvp
register_commands: true
size: 9 
open_requirement:
  requirements: 
    slots:
      type: string equals ignorecase
      input: '%player_empty_slots%' 
      output: '36'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 1'  
    offhand:
      type: string equals ignorecase
      input: '%checkitem_inslot:40%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 2'  
    helmet:
      type: string equals ignorecase
      input: '%checkitem_inslot:39%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 3'  
    chestplate:
      type: string equals ignorecase
      input: '%checkitem_inslot:38%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 4'  
    leggings:
      type: string equals ignorecase
      input: '%checkitem_inslot:37%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 5'  
    boots:
      type: string equals ignorecase
      input: '%checkitem_inslot:36%'
      output: 'no'
      deny_commands:
      - '[message] &c&lУ вас есть предметы в инвентаре! 6'  
items:
  1:
    material: hdb-40370
    data: 1
    slot: 4
    display_name: '&6Телепортация На Арену'
    lore:
    left_click_commands:
      - '[console] warps pvp %player_name%'
      - '[console] heal %player_name%' 

like that?

neon summit
#

1.13.7

neon summit
#

one of my dev added it exactly like this

#

he managed dm in 1.16.5 version

dense radish
#

well is there mby another plugin registered to the /pvp command?

neon summit
#

its not only pvp thing

#

ive tried with lots of menus

#

now menu works just fine

#

ty!

dense radish
#

np :d

bright fable
#

:/

dense radish
dense radish
#

nah its basically copy paste but still boring

bright fable
dense radish
#

cause what i m doing is boring

#

i m copying the name/lore of the item to the gui for every item

#

its mostly the display that needs to be done now for the already existed items

bright fable
dense radish
#

yuh there only a few left wood related