I give a player an iron sword as a reward. It does not give anything to the player, if the inventory is full. I use this function
- '%PlayerOptions%addItem: IRON_SWORD:1'
Can you just drop the item infront of the player?
You should check the inventory size before giving him the item, and if there is an empty spot, you can give the item. To drop it in front of the player, you should "spawn" the entity on the ground, and i don't think there is anything for that currently available.
Hmm... I was a bit surprised that it didn't work, because I think the Quests Plugin supports this. It automatically checks for space in the inventory and drops the item infront of the player, if the inventory is full.
You could use essentialsX's /give command and enable this feature created specifically for this scenario in the essentialsX's config:"# Shall we drop items instead of adding to inventory if the target inventory is full?drop-items-if-full: true"I hope you use essentials since every survival server that doesn't have their own devs to build all basic comands uses it. Also the give message in the chat wont show to the player who is given item if you run the /give command as $RUN_CONSOLE.
To post a comment, please
or register a new account.