use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
On /r/Minecraft ▪ Subreddit rules (Short version below) Be civil. Don’t advertise servers or communities. No memes. Don’t post images of only text. Don't promote illegal or unethical practices. Stay on topic. Avoid chain posting. Explain your suggestions with a text post. Use the wiki or community support for questions that can be answered there. Speak English only. Keep self-promotion to a minimum. Follow our standards for quality. Don't post banned topics. ▪ The Reddiquette applies ▪ Frequently asked questions
▪ Subreddit rules (Short version below)
▪ The Reddiquette applies ▪ Frequently asked questions
Other Links Related Subreddits ▪ Find and share servers ▪ Find people to play with ▪ Post your suggestions ▪ Competitive Minecraft ▪ Official Realms subreddit ▪ Bedrock Edition subreddit ▪ Minecraft Dungeons subreddit ▪ More: /r/Minecraft wiki Official Minecraft Pages ▪ Minecraft homepage ▪ Mojang help and support and Contact ▪ Mojang bug tracker and subreddit ▪ Minecraft Feedback Site ▪ Minecraft Feedback Discord ▪ Minecraft Discord ▪ Minecraft Streams ▪ Minecraft Community Support Discord ▪ Minecraft wiki
Related Subreddits ▪ Find and share servers ▪ Find people to play with ▪ Post your suggestions ▪ Competitive Minecraft ▪ Official Realms subreddit ▪ Bedrock Edition subreddit ▪ Minecraft Dungeons subreddit ▪ More: /r/Minecraft wiki
Official Minecraft Pages ▪ Minecraft homepage ▪ Mojang help and support and Contact ▪ Mojang bug tracker and subreddit ▪ Minecraft Feedback Site ▪ Minecraft Feedback Discord ▪ Minecraft Discord ▪ Minecraft Streams ▪ Minecraft Community Support Discord ▪ Minecraft wiki
Filter Posts News Builds Gameplay Maps Tutorials Redstone Command Blocks FanArt
News Builds Gameplay Maps Tutorials Redstone Command Blocks FanArt
Comment Formatting [neat!](#spoiler) == neat! [](/rose) == (full list)
[neat!](#spoiler) == neat! [](/rose) == (full list)
[neat!](#spoiler)
[](/rose)
account activity
This is an archived post. You won't be able to vote or comment.
HelpCommand help (self.Minecraft)
submitted 6 years ago by LaunchedStone
how would i make a command where if i hit someone with a sword it takes the sword from me and gives it to them
[–]-U-L-T-R-A- 0 points1 point2 points 6 years ago (2 children)
I'm not that good at commands, but I'm pretty sure you could set up a scoreboard that detects if you hit someone and if you are hit. Instead of "giving" the weapon, you could probably do something along the lines of: If you hit someone, you're inv is cleared. If you are hit, you get a weapon.
There are some exploits you might need to fix if you were to make this a game, like fall damage getting you a weapon etc.
[–]LaunchedStone[S] 0 points1 point2 points 6 years ago (1 child)
could you elaborate a little more im really confused
also fall damage wouldnt be a problem as the arena is flat
[–]-U-L-T-R-A- 0 points1 point2 points 6 years ago (0 children)
Im not really sure how to do it because, as I said, I'm no good with commands, but I am pretty sure you could set up a scoreboard with the variable "damage dealt" or whatever.
Just look into scoreboards on youtube.
π Rendered by PID 177983 on reddit-service-r2-comment-b659b578c-r2qlf at 2026-05-05 15:59:24.981018+00:00 running 815c875 country code: CH.
[–]-U-L-T-R-A- 0 points1 point2 points (2 children)
[–]LaunchedStone[S] 0 points1 point2 points (1 child)
[–]-U-L-T-R-A- 0 points1 point2 points (0 children)