Skip to content
MyGamesWiki
All games

JAVA EDITION 26.3

Java commands

Six practical chat commands for items, time, weather and exploration.

Before using commands

Enable Allow Commands in World Options. On a server, your permission level must allow the command.

Enter commands in chat with the leading slash. Tab completes available arguments. These examples target Java Edition; server plugins may change behaviour.

Give yourself diamonds

Adds 10 diamonds to your inventory. Replace the item ID and quantity as needed.

/give @s minecraft:diamond 10

Set daytime

Changes the world time to day.

/time set day

Clear the weather

Changes the weather to clear.

/weather clear

Locate a stronghold

Looks for the nearest stronghold. It can fail in a dimension where none can be found.

/locate structure minecraft:stronghold

Summon a zombie

Creates a zombie at your current position.

/summon minecraft:zombie

Set difficulty

Changes the world difficulty to Easy.

/difficulty easy

In Java 26.3, World Options includes Allow Commands. This page is a short reference, not a complete command list.

NOT AN OFFICIAL MINECRAFT WEBSITE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.MyGamesWiki · zzzliuke@gmail.com