Open mibby opened 4 years ago
I use ServerSigns in a couple of places that have a cost to them. Upon interacting with them, it runs commands that spawn in items to give players rewards. If a player has a full inventory, they are still charged for the sign interaction and the command still runs despite not being able to be given the item.
To combat this, I would like an option to deny sign interaction if their inventory is completely full.
Ok, I see two ways to do it :
The operator may be the best solution if you want to do action before or after this inventory check
PAPI?: https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#player %player_has_empty_slot% %player_empty_slots%
@leasoncre You are right ! @mibby SVS supports PlaceholderAPI so you can use it with your sign :
/svs add <if> placeholder:%player_has_empty_slot%=true
@EpiCanard That would not prevent charging though. That is for adding a conditional check for commands to run. ServerSigns charges on interact before it runs the commands / conditional checks. I would like to be able to have a check that prevents interaction / charging if they don't have any room in their inventory.
run the eco take command, instead of using the svs cost
Then there is no deny message when players interact with the sign if they don't have enough money and the eco take command would allow them to go negative or 0 rather than requiring the full balance, unless there was another placeholder conditional check to only run if they have over that exact amount of money.
This becomes messy and more complex than just a simple sign config option check to deny interacting with signs if their inventory is full.
I will see to add this feature inside sign flags
I don't have much free time, it can take time :)
run the eco take command, instead of using the svs cost
not ideal but could you not then build out your own if statement for balance check aswell.. I think I did this prior to learning about serversigns integrated payment requirement. Maybe this is the exception for now
Hello :)
Maybe a little more information will be helpful.
What is your goal ? Why do you want this feature ? Because a sign will add an item to the player inventory ? Should the hand be empty or can it be at least one empty space anywhere in the inventory ?
Thanks for your suggestion EpiCanard