#(idyllicx) How do I check if a player has full inventory / has no more inventory slots?
35 messages · Page 1 of 1 (latest)
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
I have tried using <player.inventory.is_full> but I don't think it is working, I have my inventory full at the moment
!debbug
!debug
If you need help with a script issue, one of the most powerful tools Denizen has to offer is full debug output. This is displaying in your console whenever scripts are running until you turn debug off. To share a debug log quickly and easily with helpers, simply run the command /denizen debug -r in-game to begin recording, then run through the part of the script you need help with, then run the command /denizen submit. This will give you a link to a paste of the debug log, which you can then copy/paste back to us!
Post a debug and a screenshot of the inventory
This is what my inventory looks like:
And here is my code:
vouchertestuse:
type: world
debug: false
events:
on player right clicks block with:vouchertest:
- if <player.inventory.is_full>:
- narrate "You cannot use this when your inventory is full." targets:<player>
- else:
- narrate "Inventory not full."
I mean, your offhand slot isn't full - it can still have 2 more items
I did fill it, including my armor slots
I don'
I don't know if this is true but it might be because of my slot 1 only having 1 nametag:
Is there a way around that?
!t inventorytag.empty_slots
Returns the number of empty slots in an inventory.
ElementTag(Number)
probably this could help
Assuming that item is going to give you items, what you actually want is probably
!t can_fit
!t InventoryTag.can_fit
Returns whether the inventory can fit an item.
ElementTag(Boolean)
Thank u!
Thread closed as resolved.
Thread was manually reopened by @slender nimbus.
Thread closed as resolved.
!l item
Item script containers are an easy way to pre-define custom items for use within scripts. Item
scripts work with the ItemTag object, and can be fetched with the Object Fetcher by using the
ItemTag constructor ItemTag_script_name. Example: - drop <player.location> super_dooper_diamond
The following is the format for the container. Except for the 'material' key (and the dScript
required 'type' key), all other keys are optional.
# The name of the item script is the same name that you can use to construct a new
# ItemTag based on this item script. For example, an item script named 'sword_of_swiftness'
# can be referred to as simply 'sword_of_swiftness'.
Item_Script_Name:
type: item
# Must be a valid ItemTag. See 'ItemTag' for more information.
# | All item scripts MUST h
...
Script Container System
Thread was manually reopened by @lavish wyvern.
@lavish wyvern Don't reopen random threads, use #bot-spam