# Java plugin connector

> Install the Connect Java plugin on Paper, Spigot, Velocity or BungeeCord to put a Minecraft server on Minekube Connect with a public address.

This page shows how to use the Connect Java plugin as the Connector for your Minecraft server or proxy.
If you run a Minecraft Java server or proxy, it is the most convenient Connector for you,
but it is not as capable as the [Gate Connector](gate.md) in terms of routing features and performance.

The Connect Plugin is a powerful multi-platform Minecraft plugin that tunnels
your players through the global [Connect Network](https://connect.minekube.com/guide/#the-connect-network) to your Minecraft server/proxy.

It supports Paper, Spigot, Velocity and BungeeCord.

## Downloading the Connect plugin

Install it like any other Minecraft plugin: download the jar for your platform, put it in the `plugins` folder and
start the server.

- [Paper / Spigot: connect-spigot.jar](https://github.com/minekube/connect-java/releases/download/latest/connect-spigot.jar)
- [Gate: Built in, no download](https://gate.minekube.com/guide/connect)
- [Velocity: connect-velocity.jar](https://github.com/minekube/connect-java/releases/download/latest/connect-velocity.jar)
- [BungeeCord: connect-bungee.jar](https://github.com/minekube/connect-java/releases/download/latest/connect-bungee.jar)

Each card downloads the latest stable release. Once the server starts, the console prints your public address.

## Disabling "enforce secure player profiles" **Required**

Minecraft 1.19 introduced the `enforce-secure-profile` property.
Players joining your server through the [Connect Network](https://connect.minekube.com/guide/#the-connect-network) cannot join while this setting
is enabled. It is safe to disable, because it only affects chat messages.

```properties title="server.properties (Spigot/PaperMC)"
enforce-secure-profile=false

# If you disable online-mode, then enforce-secure-profile has no effect
online-mode=true
```

```toml title="velocity.toml (Velocity)"
force-key-authentication = false

# If you disable online-mode, then force-key-authentication has no effect
online-mode = true
```

```yaml title="config.yml (BungeeCord)"
enforce_secure_profile: false

# If you disable online-mode, then enforce-secure-profile has no effect
online_mode: true
```

## Joining your server

Every server has a unique, configurable [endpoint](https://connect.minekube.com/guide/#connect-endpoints) name, which is also part of
the domain players join the server with.
If you do not set one, Connect uses a temporary random endpoint name
from the [Random Name Service](https://randomname.minekube.net/).

You can change the endpoint name in the Connector config at any time:

```yaml title="plugins/connect/config.yml"
endpoint: your-server-name
```

```yaml title="Gate config.yml"
connect:
  name: your-server-name
```

> The environment variable `CONNECT_ENDPOINT` takes precedence over the configuration file.

### Joining with the free public domain

After you install the Connector and start your server, the console shows
the [free public domain](https://connect.minekube.com/guide/domains) for your server, which looks like
`<endpoint>.play.minekube.net`.

```shell title="Server Console"
[connect] Enabling connect vX.Y.Z
[connect] Endpoint name: live-beru
[connect] Your public address: live-beru.play.minekube.net
```

Use that same endpoint hostname in either edition:

| Client | Server address | Port |
| --- | --- | --- |
| Java Edition | `<endpoint>.play.minekube.net` | `25565` (normally omitted) |
| Bedrock Edition | `<endpoint>.play.minekube.net` | `19132` |

Verified custom domains work the same way: Java and Bedrock use the same hostname and their edition's normal port.

Ping requests are forwarded to your server as well.

### Joining from the Browser Hub

Players can also discover your server from the in-game
[Browser Hub](https://connect.minekube.com/guide/advertising#browser-hub) at `minekube.net`
and can join with the in-game UIs or with the `/browser join <your-server-name>` command. Offline/cracked Java players
use `cracked.minekube.net` or `cracked.minekube.com` instead and can only enter endpoints that explicitly allow them.

See [Who can join](https://connect.minekube.com/guide/joining#who-can-join) for the Java, Bedrock, account-linking, and offline-mode identity matrix.

## Example setups

Common ways to run the Connect plugin as the Connector.

<span id="_1-example-velocity"></span>

### Velocity

> Diagram: Players join the Connect edge, which tunnels them to Velocity with the Connect plugin; Velocity forwards them to two Paper servers.

- We have Velocity in online mode running on `localhost:25577` and want to use Connect.
- We install the Connect plugin to Velocity's `plugins` folder.
- We choose a name for our endpoint in the Connect plugin config `plugins/connect/config.yml`.
- We start Velocity, and the Connect plugin automatically tunnels players from the Connect Network.
- Done! We can now join our Velocity server at `<endpoint>.play.minekube.net`. Online-mode players from the Connect
  Network can join thanks to the plugin's auth session injection.

<span id="_2-example-paper"></span>

### Paper

> Diagram: Players join the Connect edge, which tunnels them to a Paper server with the Connect plugin.

- We have Paper running on `localhost:25565` and want to use Connect.
- We install the Connect plugin to Paper's `plugins` folder.
- We choose a name for our endpoint in the Connect plugin config `plugins/connect/config.yml`.
- We start Paper, and the Connect plugin automatically tunnels players from the Connect Network.
- Done! We can now join our Paper server at `<endpoint>.play.minekube.net`. Online-mode players from the Connect
  Network can join thanks to the plugin's auth session injection.

<span id="_3-example-connect-passthrough-authsession-api"></span>

### Connect `passthrough` + AuthSession API

Passthrough mode and AuthSession API are **Coming soon**.

> Diagram: Planned: players join the Connect edge, which passes them through Gate Lite to an online-mode backend that authenticates them with the AuthSession API.

This is not required for the normal Connect Java Plugin setup shown above. The plugin integrates with Connect's current
auth/session handling on supported platforms.

Passthrough/AuthSession is planned for setups where the backend or proxy needs to run its own online-mode authentication
for Connect-routed players. That includes topologies such as `Connect -> Gate Lite -> online-mode backend`, which are
not supported today through Gate Lite configuration alone.

## Endpoint Token

The endpoint **name** is what you set in `plugins/connect/config.yml`. The endpoint **token** does
not belong there: the plugin reads it from `token.json` in the plugin's data directory (for example
`plugins/connect/token.json`) or from the `CONNECT_TOKEN` environment variable, which takes
precedence over the file. On first launch the plugin generates a token and saves it to `token.json`.

- Resetting the token in the Dashboard invalidates the previous token. Copy the new token
  byte-for-byte into `token.json` (a trailing space or newline is a different token) or set
  `CONNECT_TOKEN`, then restart the server or proxy.
- A Watch service authentication error (`the endpoint token ... does not match the token currently
  stored for this endpoint`) always reports this token mismatch, not a dashboard problem. If the
  endpoint name belongs to an organization, the token must have been created for this endpoint name
  inside that organization; a token from another organization, or for a different endpoint name,
  cannot take the name over. If the name is not yours, choose a different endpoint name.

## Bedrock Identity

Connect-managed Bedrock is handled at the Connect edge. The plugin can verify the Bedrock identity that Connect already
checked before forwarding the player to Paper, Velocity, or BungeeCord.

Current plugin releases supply compatible identity defaults automatically, including for older configuration files
that omit the legacy identity section. For the managed Connect service, install or update the plugin and keep its
defaults. No identity URLs, public keys, or capability settings are required. Explicit operator overrides are preserved.

The endpoint policy accepts Microsoft/Xbox-authenticated Bedrock players without a linked Java account by default.
Connector identity settings verify what the edge forwarded; they cannot change an edge rejection such as
`policy_linked_java_only`.

See the [Bedrock support guide](https://connect.minekube.com/guide/bedrock#bedrock-identity-enforcement) for the current defaults, rejection reasons,
and support checklist.
