gamehub.
Home Minecraft

GAMEHUB · CODES & GAME HELP

Minecraft cheat codes and PC commands

Minecraft Java uses slash commands in chat. Commands must be allowed in your world; ordinary survival chat does not automatically have permission to create items or switch modes. These examples target your own single-player world.

Platform
PC
Version covered
Java Edition, local worlds
Sources reviewed

Use cheats only in a single-player game or an authorized private session. Keep an untouched save before changing a game state. This is an independent text guide. Minecraft is not available to play on Gamehub.

Setup and activation

  1. Create or open a world whose settings allow commands.
  2. For an existing world, check the game’s World Options command setting.
  3. Press T to open chat and type a slash command.
  4. Use Tab completion to verify names and submit with Enter.

Codes and effects

Code or commandEffect and limits
/gamemode creativeSwitch yourself to Creative mode.
/give @s minecraft:diamond 10Give yourself ten diamonds.
/weather clearSet clear weather.
/time set daySet daytime.

Version notes and help

Edition and command syntax

Java and Bedrock share many command names but their arguments are not identical. The @s selector means the executing player in these chat examples. Type the spaces exactly, and use the suggestion list rather than guessing a long item identifier. A server console has different context from player chat.

Permissions versus broken commands

A permission error means the world or server is refusing the action; it is not evidence that the command was removed. On someone else’s server, ask the owner instead of seeking a bypass. Back up a world before experimenting with large terrain edits: these simple examples deliberately avoid destructive fill commands.

Common questions

Do I need to download a trainer?

No. This page describes the game’s own facilities. It does not require an external executable, a paid cheat subscription or changes to an online account.

How should I test these changes?

Keep a separate unmodified save, make one change at a time and check the result before continuing. Reversing a toggle does not necessarily reverse everything that happened while it was active.

Sources and further reading

Original Gamehub instructions and explanations, researched against the references below. These are source checks, not a claim that every release or command was tested in-game. Game updates and localizations can change behavior.

Browse Gamehub’s playable games

For a quick browser game with no account, choose a menu below. These links open the Gamehub catalogue, not a hosted copy of Minecraft.