Minecraft

[Must Read] Complete Guide to Minecraft Java Commands, Become a Command Master!

Zhen Jian Dang An Guan·7/14/2025

Complete Guide to Minecraft Java Commands

Here, you will find all Java commands, including basic commands, creative mode commands, survival mode commands, spectator mode commands, entity commands, block commands, game rule commands, and more.

Basic Commands

  • /help: View all available commands
  • /gamemode <mode>: Switch game mode (0: Survival, 1: Creative, 2: Adventure, 3: Spectator)
  • /give <player> <item> [amount] [data] [dataTag]: Give items to a player
  • /tp <target> <destination>: Teleport to a specified location
  • /kill <target>: Kill a specified entity
  • /time set <value>: Set the time (0: Sunrise, 6000: Noon, 12000: Sunset, 18000: Midnight)
  • /weather <weather>: Set the weather (clear: Sunny, rain: Rain, thunder: Thunderstorm)

Creative Mode Commands

  • /fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [data] [oldBlockHandling] [dataTag]: Fill a specified area with a block
  • /setblock <x> <y> <z> <block> [data] [oldBlockHandling] [dataTag]: Set a specified block
  • /clone <x1> <y1> <z1> <x2> <y2> <z2> <x> <y> <z> [maskMode] [cloneMode] [tileName]: Clone a specified area
  • /testforblock <x> <y> <z> <block> [data] [dataTag]: Check if a specified block exists

Survival Mode Commands

  • /setworldspawn [<x> <y> <z>]: Set the world spawn point
  • /spawnpoint [<player>] [<x> <y> <z>]: Set a player's spawn point
  • /enchant <enchantment> [level]: Enchant an item
  • /xp <amount> [player] [add/subtract/set]: Give a player experience
  • /effect <player> <effect> [seconds] [amplifier] [hideParticles]: Give a player a potion effect
  • /clear [<player>] [<item>] [data] [maxCount] [dataTag]: Clear a player's items

Spectator Mode Commands

  • /spectate <target>: Spectate a specified player or entity
  • /tp <target> <destination>: Teleport to a specified location

Entity Commands

  • /summon <entity> [<x> <y> <z>] [dataTag]: Summon an entity
  • /kill @e[type=<entity>]: Kill entities of a specified type
  • /tp @e[type=<entity>] <destination>: Teleport entities of a specified type to a location

Block Commands

  • /setblock <x> <y> <z> <block> [data] [oldBlockHandling] [dataTag]: Set a specified block
  • /fill <x1> <y1> <z1> <x2> <y2> <z2> <block> [data] [oldBlockHandling] [dataTag]: Fill a specified area with a block
  • /testforblock <x> <y> <z> <block> [data] [dataTag]: Check if a specified block exists

Game Rule Commands

  • /gamerule <rule> <value>: Set a game rule
  • /gamerule <rule>: View a game rule