> ## Documentation Index
> Fetch the complete documentation index at: https://docs.purpify.host/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable and obtain Java command blocks

> Enable command blocks and give one to an operator on a Purpify Minecraft Java Edition server.

Command blocks run server commands from the world. Only trusted operators should create or edit them.

## Enable command blocks

<Tabs>
  <Tab title="World Manager">
    <Steps>
      <Step title="Stop the server">
        Stop the Java server before editing its world settings.
      </Step>

      <Step title="Open World Manager">
        Open the server in the Purpify game panel and go to **World Manager**.
      </Step>

      <Step title="Edit the active world">
        Find the world currently used by the server and select **Edit**.
      </Step>

      <Step title="Open Game Rules">
        Go to **Game Rules** and enable command blocks.
      </Step>

      <Step title="Save and restart">
        Save the change and start the server again.
      </Step>
    </Steps>
  </Tab>

  <Tab title="server.properties">
    Stop the server, open `server.properties`, and set:

    ```properties theme={"dark"}
    enable-command-block=true
    ```

    Save the file and restart the server.
  </Tab>
</Tabs>

## Give an operator a command block

Run this in the panel console:

```text theme={"dark"}
give ExactJavaUsername minecraft:command_block
```

Or join with [operator access](/java/manage-players) and run:

```text theme={"dark"}
/give ExactJavaUsername minecraft:command_block
```

On clients with an **Operator Items Tab** option, enable it under controls, switch to Creative mode, and use the Operator Utilities inventory tab.

<Warning>
  A repeating or chained command block can change large areas or run commands continuously. Create a backup before testing command-block automation.
</Warning>

<Columns cols={2}>
  <Card title="Set game rules" icon="sliders" href="/java/game-rules">
    Configure command blocks and other world mechanics.
  </Card>

  <Card title="Manage operators" icon="user-shield" href="/java/manage-players">
    Control who can use administrative commands.
  </Card>
</Columns>
