trigger command datapack to give players an item?
hi! i’m really new to datapack creation, but i run a small server for some friends, and it’s becoming an unfortunate necessity.
we have the origins mod installed, and players often are wanting an origin orb, so to make it so my friends can get one even when i’m offline, i’ve been trying to set up a /trigger command for it. unfortunately i can’t really find any tutorial or walkthrough or *anything* on how i’d go about doing this.
literally all i need the /trigger command to do is run `/give @s origins:orb_of_origin` for whatever player typed it in. help?
edit: this is for version 1.21.1
we have the origins mod installed, and players often are wanting an origin orb, so to make it so my friends can get one even when i’m offline, i’ve been trying to set up a /trigger command for it. unfortunately i can’t really find any tutorial or walkthrough or *anything* on how i’d go about doing this.
literally all i need the /trigger command to do is run `/give @s origins:orb_of_origin` for whatever player typed it in. help?
edit: this is for version 1.21.1
Commentaires
*I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/Minecraft) if you have any questions or concerns.*
* Downvote this comment if this post is poor quality or does not fit the purpose of r/Minecraft
* Downvote this comment *and report the post* if it breaks the [rules](https://www.reddit.com/r/Minecraft/wiki/rules)
----
(*Vote has already ended*)
Make a function file that has something like:
\`\`\`
execute as u/a\[scores={getOrb=1..}\] run give u/s origins:orb\_of\_origin
scoreboard players set u/a getOrb 0
scoreboard players enable u/a getOrb
\`\`\`
Then just run that function on repeat with a command block or in your tick function. Players can use \`/trigger getOrb\` and boom, orb delivered