You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you checked the wiki page to see if your suggestion is already added?
Yes/No
Have you checked the issue tracker to see if your suggestion was already submitted and denied? Yes/No
Have you asked if the feature already exists in the Discord Server?(Or got redirected to a Github issue here) Yes/No
Is your feature request related to a problem? Please describe.
There are no issues related to this feature request
Describe the solution you'd like
I'd like to see hasvalue have a <, <=, >, >= option, I'm trying to have an item display for a range of values, rather than just one.
Describe alternatives you've considered
Creating a separate item for each and every value I'd like, but I'm talking numbers into the thousands so it's just not practical.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
This can be done using PlaceholderAPI, I have created an example item to explain.
You will need to use the JavaScript placeholder and hasvalue with CommandPanels combined. The example below will check to see if the placeholder "vault_eco_balance" which is the player's balance, is greater than 20 or not. If it is, it will return true, otherwise, it will return false.
This is why the value: true can be done, because it will not be comparing a number, but only a true/false value. If you need to reverse the outcome, you can always change value: to false, or even change output: to false (they'll do the same thing in this case).
'23':
material: REDSTONE_BLOCKname: 'You NEED $20!'lore:
- '&cYou have $%vault_eco_balance%'hasvalue:
output: truevalue: truecompare: '%javascript_greater_than_{vault_eco_balance},20%'material: EMERALD_BLOCKname: 'You HAVE $20!'
When you get to the step that requires you to write javascript, I have done this for you, simply copy and paste this script I made into the greater_than.js file:
In the code above, you can see the section that says placeholder > args[1]. Simply change the > to any javascript operator if you want it to be different (https://www.w3schools.com/js/js_comparisons.asp). Make sure to do /cpr and /papi reload when making changes to both plugins.
Have you checked the wiki page to see if your suggestion is already added?
Yes/No
Have you checked the issue tracker to see if your suggestion was already submitted and denied?
Yes/No
Have you asked if the feature already exists in the Discord Server? (Or got redirected to a Github issue here)
Yes/No
Is your feature request related to a problem? Please describe.
There are no issues related to this feature request
Describe the solution you'd like
I'd like to see hasvalue have a <, <=, >, >= option, I'm trying to have an item display for a range of values, rather than just one.
Describe alternatives you've considered
Creating a separate item for each and every value I'd like, but I'm talking numbers into the thousands so it's just not practical.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: