Skip to content
 
 

Repository files navigation

PureFloodgate

License: MIT

PureFloodgate is a fork of Floodgate with option for forcing BE players to use JE offline UUIDs, to suit the needs of some servers that needs Floodgate's Form APIs but want to keep things simple.

Floodgate lets Bedrock players join an online-mode Java server through Geyser. To do that it gives every Bedrock player a UUID derived from their XUID, which is what makes account linking and a few internals work. Servers that only use Floodgate for Bedrock detection and Forms often don't want that: their plugins, their world data and their permission files are all keyed on the offline-mode UUIDs their Java players already have.

PureFloodgate keeps everything Floodgate offers and adds a uuid-mode option, so you decide which UUID a Bedrock player gets.

The uuid-mode option

In plugins/floodgate/config.yml:

uuid-mode: floodgate
  • floodgate (default) — a UUID derived from the player's XUID. This is stock Floodgate behaviour, and keeps Bedrock players separate from Java players.
  • offline — the offline-mode Java UUID, computed from the player's username. A Bedrock player then gets exactly the same UUID an offline-mode Java player with the same username would get.

The username used is the final one the server sees, so the username-prefix and replace-spaces options apply to it. That means you can set username-prefix: "" and have a Bedrock player and an offline-mode Java player with the same name become the same account.

A few things worth knowing before you switch:

  • A restart is required. The UUID is resolved when the player logs in.
  • Add the key by hand when upgrading. Floodgate never writes new options into an existing config.yml. A missing uuid-mode key simply falls back to floodgate, so nothing breaks, but the option won't appear in your config until you add it yourself.
  • Do this on a fresh server, or migrate your data first. Player data, permissions and plugin databases are keyed on the UUID, so changing it makes your existing Bedrock players look like new players.
  • Account linking still works. When a Bedrock account is linked to a Java account, the Java account's UUID is used, just like in Floodgate.

Everything else — Forms, Bedrock detection, the API, skins, player linking, the database implementations — is unchanged from upstream Floodgate.

Building

Requires JDK 17. The build targets Java 8 bytecode for the Spigot module and Java 11 for Velocity, but Gradle itself has to run on 17 (JAVA_HOME must point at it).

./gradlew build

The jars you actually install are:

Platform Jar
Spigot / Paper / Folia spigot/build/libs/floodgate-spigot.jar
Velocity velocity/build/libs/floodgate-velocity.jar
BungeeCord bungee/build/libs/floodgate-bungee.jar

The database addons are built to database/*/build/libs/floodgate-*-database.jar, and are only needed if you host your own linking database.

Each platform also produces a -unshaded, a -sources and a -javadoc jar. Those are build artifacts for publishing — don't install them.

Credits

PureFloodgate is a fork of Floodgate by GeyserMC, and follows it under the same MIT license. See the Floodgate wiki for documentation on how Floodgate works, how to set it up and how to use its API.

About

Floodgate but without the UUID fuss.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages