Skip to content

Detect Bedrock Players with Floodgate

BedrockUtils provides a simple way for PaperMC plugins to detect Bedrock players through Geyser and Floodgate.

Instead of accessing the Floodgate API directly throughout your plugin, you can use a single utility method:

if (BedrockUtils.isBedrockPlayer(player)) {
// Player joined through Geyser/Floodgate.
}

This keeps Floodgate-specific integration isolated from the rest of your plugin code.

Use BedrockUtils.isBedrockPlayer(Player) to determine whether a player was identified by Floodgate:

Player player = event.getPlayer();
if (BedrockUtils.isBedrockPlayer(player)) {
player.sendMessage(
Component.text("Welcome, Bedrock player!")
);
}

The method returns:

Result Meaning
true The player was identified as a Floodgate player.
false The player is not a Floodgate player, or Floodgate is unavailable.

This makes the method suitable for conditional behavior such as Bedrock-specific messages, interfaces, or gameplay handling.

Floodgate is an optional dependency.

BedrockUtils checks whether Floodgate is enabled before accessing its API.

If Floodgate is not installed, isBedrockPlayer(...) returns false.

This allows a Paper plugin to use the utility without making Floodgate a required dependency.

To allow BedrockUtils to access Floodgate when it is installed, declare Floodgate as an optional dependency in paper-plugin.yml:

dependencies:
bootstrap:
floodgate:
load: BEFORE
required: false
join-classpath: true
server:
floodgate:
load: BEFORE
required: false
join-classpath: true

Both the bootstrap and server dependency entries are required for the integration.

The dependency remains optional because both entries use:

required: false

join-classpath: true makes Floodgate’s classes available to the plugin when Floodgate is installed.

A plugin can access Floodgate directly:

FloodgateApi.getInstance()
.isFloodgatePlayer(player.getUniqueId());

With Reedwork, the application code can instead use:

BedrockUtils.isBedrockPlayer(player);

This keeps the Floodgate API out of the rest of the plugin and gives the application a small, focused API for Bedrock player detection.

Checks whether the specified player joined through Floodgate.

Parameters:

Parameter Type Description
player Player The player to check.

Returns:

true if the player is identified as a Floodgate player; otherwise false.

If Floodgate is unavailable, the method also returns false.

BedrockUtils is useful when a Paper plugin needs to distinguish between Java Edition and Bedrock players.

Typical use cases include:

  • Bedrock-specific player messages
  • platform-specific UI or interaction
  • different gameplay behavior
  • logging the player’s platform
  • optional Geyser/Floodgate integration

The utility intentionally provides only the Bedrock detection layer. Other Floodgate functionality can still be accessed directly when a plugin requires features that BedrockUtils does not expose.

For other PaperMC and Bukkit utilities, see the Reedwork utility collection.

You can also explore Color Utilities for color and Adventure text operations.