# How to Set Up OP Admin & Java Requirements in Minecraft
Learn how to grant admin privileges (OP status) on your Minecraft server and ensure you are using the correct Java runtime version for your Minecraft version.
---
## 1. Important Java Version Requirements
Minecraft requires specific versions of the Java Runtime Environment (JRE). Running a server on an incompatible Java version will cause server crash loops on boot.
| Minecraft Version | Required Java Version | Notes |
| :--- | :--- | :--- |
| **1.8 – 1.16.5** | **Java 8** (or Java 11) | Standard legacy Minecraft builds |
| **1.17 – 1.17.1** | **Java 16** | Transition build |
| **1.18 – 1.20.4** | **Java 17** | Modern Vanilla, Paper, & Spigot |
| **1.20.5 – 1.21+** | **Java 21** | Current modern standard |
> [!IMPORTANT]
> When launching a Minecraft server in Docker or custom containers, ensure your container base image matches the target Java version (e.g. `eclipse-temurin:21-jre` for Minecraft 1.21+).
---
## 2. Granting OP (Operator / Admin) Status
To run in-game admin commands (`/gamemode`, `/teleport`, `/ban`, `/op`), you must grant yourself OP privileges:
1. Open your server control panel and navigate to the **Console** tab.
2. Type the following command (without the leading slash `/`):
```text
op YourMinecraftUsername
```
3. You should see a console confirmation: `[Server] Made YourMinecraftUsername a server operator`.
4. In-game, open chat and type `/gamemode creative` to test your admin privileges.
---
## 3. Revoking OP Status
To remove admin permissions from a player, enter the following command in the server console:
```text
deop PlayerUsername
```
---
## 4. Useful Admin Commands
* `/op <player>` — Grants operator status.
* `/deop <player>` — Revokes operator status.
* `/kick <player> [reason]` — Disconnects a player from the server.
* `/ban <player> [reason]` — Permanently bans a player.
* `/pardon <player>` — Removes a ban.
* `/whitelist on` / `/whitelist add <player>` — Enables and manages player access lists.