Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

values #179

Open
teslabars opened this issue Mar 7, 2025 · 5 comments
Open

values #179

teslabars opened this issue Mar 7, 2025 · 5 comments

Comments

@teslabars
Copy link

teslabars commented Mar 7, 2025

Hello. How to enter a range of values ito output parametr. In example:

'13':
material: flint_and_steel
hide_attributes: true
HIDE_DESTROYS: true
data: 0
slot: 35
priority: 1
display_name: '&eDelete all items in inventory'
lore:
- '&f/clear'
left_click_commands:
- '[close]'
- '[player] clear'
view_requirements:
requirements:
prover:
type: string equals
input: '%player_empty_slots%'
output: 35-0
'13a':
material: flint_and_steel
hide_attributes: true
HIDE_DESTROYS: true
priority: 2
data: 0
slot: 35
display_name: '&4Your inventory is empty!'
view_requirements:
requirements:
prover:
type: string equals
input: '%player_empty_slots%'
output: 36

@BlitzOffline
Copy link
Member

Instead of using the string equals requirement, you should use the comparator requirements. In your example it would look something like this:

view_requirement:
  requirements:
    prover1:
      type: '>='
      input: '%player_empty_slots%'
      output: 0
    prover2:
      type: '<='
      input: '%player_empty_slots%'
      output: 35

You can read more about the 'comparator' requirement types (and about any other requirement type) here: https://wiki.helpch.at/helpchat-plugins/deluxemenus/options-and-configurations/requirements#comparators

@teslabars
Copy link
Author

Instead of using the string equals requirement, you should use the comparator requirements. In your example it would look something like this:

view_requirement:
requirements:
prover1:
type: '>='
input: '%player_empty_slots%'
output: 0
prover2:
type: '<='
input: '%player_empty_slots%'
output: 35
You can read more about the 'comparator' requirement types (and about any other requirement type) here: https://wiki.helpch.at/helpchat-plugins/deluxemenus/options-and-configurations/requirements#comparators

if i ise this, i see that my inventory is empty - always

'13':
material: flint_and_steel
hide_attributes: true
HIDE_DESTROYS: true
data: 0
slot: 35
display_name: '&eClear'
lore:
- '&f/clear'
left_click_commands:
- '[close]'
- '[player] clear'
view_requirements:
requirements:
prover1:
type: '<='
input: '%player_empty_slots%'
output: '35'
'13a':
material: flint_and_steel
hide_attributes: true
HIDE_DESTROYS: true
data: 0
slot: 35
display_name: '&4Empty!'
view_requirements:
requirements:
prover2:
type: '>='
input: '%player_empty_slots%'
output: '36'

@BlitzOffline
Copy link
Member

Hello, please put the menu in code blocks or in a paste bin and send it here. Simply pasting it breaks the formatting which makes it very hard or even impossible to figure out what the issue is.

@BlitzOffline BlitzOffline reopened this Mar 9, 2025
@teslabars
Copy link
Author

Hello, please put the menu in code blocks or in a paste bin and send it here. Simply pasting it breaks the formatting which makes it very hard or even impossible to figure out what the issue is.

https://docs.google.com/document/d/16mM_Unlo7XC71pT2R-tPU8ZAk3W1ZQyX1BTXM5R2pGk/edit?usp=sharing

@BlitzOffline
Copy link
Member

You changed the example I gave you. You used view_requirements: instead of view_requirement:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants