The best Minecraft commands to give weapons, remove blocks, make day and more
24 Jun, 2022
Discover how to get or give weapons, remove or put blocks, make daytime, and more in Minecraft with the commands that we show you in this article. We also tell you how to create a command block, find villages, teleport anywhere on the map, and even enchant your items!
Command to create a command block
The command block allows you to activate complex commands. It is a requirement to use a command block if you want to enter a long command, with many terms and conditions. Since there are other commands in this article that require a command block to work, we wanted to start with this section.
There are different types of blocks you can create:
/give @s command_block 1: you receive 1 command block. This is the standard command block.
/give [player name] command_block 1: Gives a command block to the specified player. You can also use this command to get yourself a command block (by typing your nickname).
/give @a chain_command_block 4: All players receive 4 chain command blocks. This command block is activated only if conditions specified by you and other command blocks are met.
/give @p repeating_command_block 1: The nearest player receives a repeating command block. This command block activates the designated command over and over again.
/give @p command_block_minecart 1 - The nearest player receives a command block in a minecart. It serves to have a mobile command block.
For clarification, the second term in this command is an abbreviation used to select targets. These are the meanings:
@s: you receive the item or effect.
@p: The closest player receives the item or effect.
@a: All players receive the item or effect.
@r: A random player receives the weapon or effect.
@e: The entities (or a specific entity) receive the weapon or effect.
You can use these shortcuts in many Minecraft commands. They are very useful!
Instead of spending hours getting materials to craft your favorite weapons, you can use commands! The /give command is useful for this purpose. Below we put a list of many of the Minecraft weapons:
/give @s diamond_sword 5: You get 5 diamond swords.
/give @p golden_sword 1: Give the nearest player a golden sword.
/give @a netherite_sword 2: All players in the game receive 2 nephrite swords.
/give @r iron_sword 1: A random player gets an iron sword.
/give @s trident 1: you get a trident.
/give @s bow 10: you get bows.
/give @p crossbow 1: The player closest to you receives a crossbow.
/give @a arrow 50: All players get 50 arrows.
/give @s spectral_arrow 1: You get a spectral arrow.
If you enter these commands in Bedrock Edition, you may need to add a 0 to the end of the command. To customize the name of the weapon, place enchantments, and make the weapon appear in a specific location or entity, we recommend using DigMinecraft's weapon drop generator. It only works for the Java Edition version.
Note: if the command is very long, you will have to use a command block.
Commands to remove, put and fill blocks
The /fill command is one of the most useful. With it, you can modify the content of the blocks around you. If you want to remove, put and fill blocks of different types, this is your command! There are three basic structures to follow:
/fill [x1 y1 z1] [x2 y2 z2] [block type] : You first set the starting (x1 y1 z1) and ending (x2 y2 z2) coordinates, drawing an effect region. You then replace all the blocks found in the region with the type of block you indicated in the command.
/fill [x1 y1 z1] [x2 y2 z2] [block type 1] replace [block type 2] : Same as above, but replaces only the blocks you specified in [block type 2].
/fill [~x1 ~y1 ~z1] [~x2 ~y2 ~z2] [block type] : Use " ~ " before all numbers if you prefer to indicate coordinates using your character as a reference point.
Warning: the term replace is only one of the available actions. There are other actions you can take with this command:
Destroy: Replaced blocks will drop items as if you had mined them with a pickaxe or shovel.
outline: replaces only the outer blocks of the drawn region with the coordinates.
hollow: replaces only the outer blocks of the drawn region with the coordinates, and the inner blocks are automatically replaced to air.
keep: Replaces only air blocks within the region.
Here are examples of how to use the command:
/fill 0 0 0 15 10 10 diamond_block : Replaces the blocks in the indicated region with diamond blocks.
/fill ~-10 ~0 ~-10 ~10 ~0 ~10 gold_block : Replaces nearby blocks under your feet with gold blocks.
/fill 50 -5 8 80 2 -8 air : Empty the indicated region and fill it with air.
/fill ~0 ~0 ~0 ~20 ~-10 ~20 water replace lava : Replace all lava blocks in the indicated region with water blocks.
/fill 300 27 40 0 20 45 redstone_block destroy : Replaces all blocks in the indicated region with redstone blocks. You can recover the materials of the replaced blocks.
The command designated to make day in Minecraft can be used to set any other time of day. To make this change, just use the /time set [time of day] command.
We show you a list with the key hours of the day and night:
/time set 1000 or /time set day : make day. It is equivalent to the time 7:00am.
/time set 6000 or /time set noon : noon. It is equivalent to the time 12:00 pm.
/time set 12000 or /time set sunset : dusk. It is equivalent to the time 6:00 pm.
/time set 13000 or /time set night : do at night. It is equivalent to the time 7:00 pm.
/time set 18000 or /time set midnight : midnight. It is equivalent to the time 12:00am.
/time set 23000 or /time set sunrise : sunrise. It is equivalent to the time 5:00am.
Regarding changing the weather, you can do it with the /weather [weather] [duration in seconds] command. Minecraft lets you clear the weather, set rain, turn on stormy weather, and, under specific conditions, make it snow. The duration is optional.
/weather clear 999999 : Clears the weather for 999999 seconds (over 200 hours). It is a good alternative so that it does not rain for many hours.
/weather rain 4000 : Makes it rain in Minecraft for 3600 seconds (1 hour).
/weather rain (in snowy biome): If you use this command in a snowy biome, snow will fall instead of normal rain.
/weather thunder : activate stormy weather.
Commands to find villages
Finding villages in Minecraft is very easy! To find a village, just type /locate village in the command console. The game will return the coordinates of the nearest town. With this information, you can teleport to the corresponding village with another command. We cover this in the next section.
Here are several ways to use the /locate command :
/locate village : returns the coordinates of the nearest village to you.
/locate mansion : Returns you the coordinates of the closest mansion to you.
/locate stronghold : Returns you the coordinates of the Nether stronghold closest to you.
/locate shipwreck : Returns you the coordinates of the closest shipwreck to you.
/locate endcity : returns the coordinates of the End City closest to you.
/locate buried_treasure / buriedtreasure : returns the coordinates of the closest buried treasure to you.
Commands to teleport
The worlds created in Minecraft are large, and at times it is tedious to navigate. Fortunately, the /tp command allows us to teleport to any point on the map. Thanks to this command, it is easy to reunite with your friends if you have been far apart.
These are different ways you can use the teleport command:
/tp 24 77 8 : you teleport to coordinates X=24, Y=77, Z=8.
/tp [Friend Player Name] : Teleport to where your friend is.
/tp [Player 1 Name] [Player 2 Name] : Teleport player 1 to where player 2 is.
/tp @p [Your name] : Teleports the closest player to where you are.
Enchantments are one of the best parts of Minecraft combat. There are dozens of enchantments that you can easily get with the /enchant command. This command allows you to apply an enchantment on the item wielded by the targeted player. Enchantment and item compatibility restrictions apply.
Some examples are:
/enchant [Player Name] aqua_affinity 1 : The item the player wields receives the Aquatic Affinity enchantment.
/enchant [Player Name] feather_falling [1-4] : The item the player wields receives the Feather Falling enchantment.
/enchant [Player Name] power [1-5] : The item the player wields receives the Power enchantment.
/enchant [Player Name] protection [1-4] : The item the player wields receives the Protection enchantment.
/enchant [Player Name] fire_protection [1-4] : The item the player wields receives the Fire Protection enchantment.
/enchant [Player Name] flame 1 : The item the player wields receives the Flame / Fire / Incendiary Arrow enchantment.
/enchant [Player Name] efficiency [1-5] : The item the player wields receives the Efficiency enchantment.
/enchant [Player Name] soul_speed [1-3] : The item the player wields receives the Soul Speed enchantment.
/enchant [Player Name] unbreaking [1-3] : The item the player wields receives the Unbreakable enchantment.
/enchant [Player Name] infinity 1 : The item the player wields receives the Infinity enchantment.
/enchant [Player Name] fortune [1-3] : The item the player wields receives the Fortune enchantment.
/enchant [Player Name] vanishing_curse 1 :The item the player wields receives the Vanishing Curse enchantment.
Note : You can replace the player's name with one of the abbreviations (@s, @p, @a, @r). We explain the abbreviations in the "Command to create a command block" section.
Useful server commands
There are commands that will help you better manage your server. Here are a few that are helpful:
/ban [Player Name] [Reason] : Ban the indicated player. The reason is optional.
/ban-ip [Player's IP Address] [Reason] : Ban the indicated player based on their IP address. The reason is optional.
/banlist [players / ips] : shows you the list of all banned players. You can see the names (players) or the IP addresses (ips).
/pardon [player name] : removes the eviction from the indicated player.
/pardon-ip [Player's IP Address] : Unban the indicated player based on their IP address.
/list uuids : Shows you a list of all connected players. The term "uuids" is optional.
/gamemode [0 / 1 / 2 / 3] : Change the game mode to Survival / Creative / Adventure / Spectator.
/difficulty [peaceful / easy / normal / hard ] : change the difficulty level.