Clean-up and restructure
Also added PR check
This commit is contained in:
57 files changed
+1715
-278
No files matched your search
@@ -0,0 +1,66 @@
|
||||
---
|
||||
layout: page
|
||||
title: Floodgate API
|
||||
permalink: /floodgate/api/
|
||||
---
|
||||
|
||||
### Floodgate has an API to extend what is possible and allow servers to get information about the Bedrock client. It also allows other plugins access to [Cumulus](Forms)
|
||||
|
||||
This page will contain information about class FloodgateApi.<br>
|
||||
See the sidebar for more information about other parts of the API.
|
||||
|
||||
### Accessing the Floodgate API
|
||||
|
||||
Floodgate uses the open collaboration repo. The following example is for Maven, but the same concept applies for Gradle etc.
|
||||
```xml
|
||||
<repository>
|
||||
<id>opencollab-snapshot</id>
|
||||
<url>https://repo.opencollab.dev/maven-snapshots/</url>
|
||||
</repository>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.geysermc.floodgate</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
The Floodgate API has changed in Floodgate 2.0. The most important change is that the API methods are no longer static and instead instance-based, as shown below.
|
||||
|
||||
---
|
||||
|
||||
The class FloodgateApi is the base class of the API and you need to use it to access any part of the API.<br>
|
||||
To access it, you simply type:
|
||||
```java
|
||||
FloodgateApi.getInstance();
|
||||
```
|
||||
|
||||
After you got the instance, you have access to all the methods.<br>
|
||||
Use the documentation in the API module to see (and get info about) every single method available.
|
||||
Most [API methods have a simple explanation](https://github.com/GeyserMC/Floodgate/tree/master/api/src/main/java/org/geysermc/floodgate/api).
|
||||
|
||||
#### We'll highlight a few to get you started quickly:<br>
|
||||
|
||||
`FloodgateApi#isFloodgatePlayer(UUID)`<br>
|
||||
Used to check if the given UUID of an **online** player is a Bedrock player.
|
||||
|
||||
`FloodgateApi#getPlayer(UUID)`<br>
|
||||
Used to get the FloodgatePlayer instance of an **online** player.<br>
|
||||
Click [here](FloodgatePlayer) to get more information about the FloodgatePlayer class.
|
||||
|
||||
**Note**: You don't need to wait until the Bedrock player is online to use the getPlayer and isFloodgatePlayer methods.<br>
|
||||
You can even use them in the pre-login events.
|
||||
|
||||
`FloodgateApi#getPlayerLink()`<br>
|
||||
Used to get the PlayerLink instance used by Floodgate to check for linked accounts.<br>
|
||||
Click [here](PlayerLink) to get more information about the PlayerLink class
|
||||
|
||||
`FloodgateApi#sendForm(UUID, Form(Builder))`<br>
|
||||
Used to send a form to the Bedrock player with the given UUID.<br>
|
||||
Click [here](Forms) to get more information about Forms.
|
||||
|
||||
### Using the API on backend servers
|
||||
|
||||
In order to successfully use the API on backend Spigot servers when using a proxy, `send-floodgate-data` must be set to `true` on the proxy Floodgate's config, and the `key.pem` file must be identical between all Floodgate instances.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
layout: page
|
||||
title: Commands
|
||||
permalink: /floodgate/commands/
|
||||
---
|
||||
|
||||
| Command | Permission | Description |
|
||||
|:---:|:---:|:---:|
|
||||
| `fwhitelist` | `floodgate.command.whitelist` | Whitelist command for Floodgate players. See [here](https://github.com/GeyserMC/Floodgate/wiki/Features#whitelist-command) for details. |
|
||||
| `linkaccount` | `floodgate.command.linkaccount` | Link your account for local linking. |
|
||||
| `unlinkaccount` | `floodgate.command.unlinkaccount` | Unlink your account for local linking. |
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
layout: page
|
||||
title: Features
|
||||
permalink: /floodgate/features/
|
||||
---
|
||||
|
||||
## Whitelist command
|
||||
|
||||
Floodgate 2.0 has a whitelist command, `fwhitelist`, that should be used for adding or removing Floodgate players to whitelist.json. The username prefix doesn't need to be included.
|
||||
`fwhitelist add Tim203`
|
||||
`fwhitelist remove Tim203`
|
||||
|
||||
You can also specify a UUID: `fwhitelist add 00000000-0000-0000-0009-01f64f65c7c3`
|
||||
|
||||
The permission node is `floodgate.command.whitelist`.
|
||||
|
||||
## What is the Global Api?
|
||||
The Global Api is an API that is available for every server. It currently includes: [Global Linking](#What-is-Global-Linking), [skin uploading](#What-is-skin-uploading), getting a xuid by gamertag, and getting a gamertag by xuid.
|
||||
We don't store anything else than you can access by the Global Api, except for some non-identifiable metrics. The source code of the Global Api is available [here](https://github.com/GeyserMC/global_api) and the source code of the Global Linking server is available [here](https://github.com/GeyserMC/GlobalLinkServer).
|
||||
|
||||
## What is Global Linking?
|
||||
Instructions and information about how to link can also be found here: https://link.geysermc.org/
|
||||
|
||||
Before we introduced Global Linking, you always had to link your Java and Bedrock account on every individual server you visited (that has Floodgate). Global Linking is here to fix that problem. Link once, join everywhere.<br>
|
||||
Global Linking is part of the [Global Api](#What-is-the-Global-Api) and uses the GlobalLinkServer to link your account. To be able to link your account you have to do the following:
|
||||
1. Join the GlobalLinkServer with both your Java and Bedrock account
|
||||
(IP: `link.geysermc.org`, Java port: `25565`, Bedrock port: `19132`)
|
||||
2. Start the linking process by typing `/linkaccount` on your Java **or** Bedrock account
|
||||
3. You'll get a message with a random number that you have to enter on the account that you did not start the linking process on.
|
||||
4. Enter the random number on the other account by typing `/linkaccount <code>`
|
||||
5. You should get kicked from the server on both your Bedrock and Java account with the message that it had successfully linked your accounts.
|
||||
|
||||
Global Linking should be enabled by default on every server running Floodgate 2.0, but in the case that you disabled it, you can enable it again by opening your Floodgate config and make sure that the `player-link` section looks similar to this:
|
||||
```yml
|
||||
# Configuration for player linking
|
||||
player-link:
|
||||
# Whether to enable the linking system. Turning this off will prevent
|
||||
# players from using the linking feature even if they are already linked.
|
||||
enabled: true
|
||||
# Whether to use global linking. Global linking uses a central server to request link
|
||||
# accounts, allowing people to link once, join everywhere (on servers with global linking).
|
||||
use-global-linking: true
|
||||
```
|
||||
([see the default config](https://github.com/GeyserMC/Floodgate/blob/master/common/src/main/resources/config.yml))
|
||||
|
||||
Once you saved the config and restarted your server you should be using Global Linking.
|
||||
|
||||
If you don't want to use Global Linking, you can disable `enable-global-linking` in the Floodgate config.
|
||||
|
||||
### Local Linking
|
||||
You can also set up a local linking database on your server. Local linking can work with Global Linking at the same time. Link entries in your local database will override entries in the Global Linking Server.
|
||||
|
||||
Note that you only have to follow these steps on your proxy (BungeeCord or Velocity), if you have one.
|
||||
|
||||
1. Download one of the linking databases extensions [here](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/).
|
||||
If you need help picking the right one: choose `mysql` if you already have a database or want to have a multi-proxy setup. For anything else choose `sqlite`. The full name should be `floodgate-*type*-database.jar`.
|
||||
2. Copy the database extension jar you just downloaded *into* the floodgate 2.0 plugin folder (e.g. `/plugins/floodgate/`).
|
||||
3. Enable `enable-own-linking` in the `player-link` section of Floodgate.
|
||||
4. Set `type` in the `player-link` section to your database type (currently either `mysql` or `sqlite`). (If you used Floodgate 1.0 and had linking enabled back then; the database type was `sqlite`).
|
||||
5. Restart your server
|
||||
|
||||
If you have selected `mysql` a new data folder for the database should be generated inside the Floodgate data folder. You can enter your database credentials in there. After you did that restart your server once more.
|
||||
|
||||
That should be it. You can then link your accounts by following the instructions you get when typing `/linkaccount`.
|
||||
|
||||
## What is skin uploading?
|
||||
Skins of Bedrock player should be visible to Java players on servers with Floodgate 2.0 installed.
|
||||
If they aren't, it's most likely that the skin uploading queue has grown too large and can take a while to upload your skin.
|
||||
|
||||
Skin uploading is also a part of the [Global Api](#What-is-the-Global-Api). It is responsible for converting Bedrock skins to Java skins and uploading them to Mojang servers make them show up on Java Edition.
|
||||
@@ -0,0 +1,202 @@
|
||||
---
|
||||
layout: page
|
||||
title: Forms and Cumulus
|
||||
permalink: /floodgate/forms/
|
||||
---
|
||||
|
||||
# What is Cumulus?
|
||||
|
||||
Bedrock Edition has a cool exclusive feature called Forms.<br>
|
||||
Cumulus is the new Forms API that we use in Geyser and Floodgate. The source code is available [here](https://github.com/GeyserMC/Cumulus).
|
||||
You can access the Cumulus API through the [Floodgate API](FloodgateApi).
|
||||
|
||||
Bedrock knows three types of Forms:
|
||||
* ModalForm
|
||||
* SimpleForm
|
||||
* CustomForm
|
||||
|
||||
We'll discuss them one by one starting with the easiest and ending with the least easy form type.<br>
|
||||
After that, you get an overview of every single component.<br>
|
||||
Then we'll talk about sending the form, receiving a response and doing advanced stuff.<br>
|
||||
|
||||
## ModalForm
|
||||
|
||||
While this is the easiest form type it's also the least customisable.<br>
|
||||
You have a title, description (content) and two buttons.
|
||||
|
||||

|
||||
|
||||
Code used in the image:
|
||||
|
||||
```java
|
||||
ModalForm.builder()
|
||||
.title("Title")
|
||||
.content("Content")
|
||||
.button1("Button 1")
|
||||
.button2("Button 2")
|
||||
```
|
||||
|
||||
## SimpleForm
|
||||
|
||||
While this one is less easy then ModalForm is, it also has more customizability.<br>
|
||||
It's still limited to title, content and buttons, but these buttons can also have images and do not have a minimum and maximum of two.
|
||||
|
||||

|
||||
|
||||
Code used in the image:
|
||||
```java
|
||||
SimpleForm.builder()
|
||||
.title("Title")
|
||||
.content("Content")
|
||||
.button("Button without an image")
|
||||
.button("Button with URL image", FormImage.Type.URL, "https://github.com/GeyserMC.png?size=200")
|
||||
.button("Button with path image", FormImage.Type.PATH, "textures/i/glyph_world_template.png")
|
||||
```
|
||||
|
||||
## CustomForm
|
||||
|
||||
While the CustomForm is the last one on our list (and thus the least easy one), it also has the greatest customizability.<br>
|
||||
This form exists of a title, content and a list of different components e.g. label, slider and input.<br>
|
||||
See [Components](#Components) for more information about every component you can use and in which form type.
|
||||
|
||||

|
||||
|
||||
Code used in the image:
|
||||
|
||||
```java
|
||||
CustomForm.builder()
|
||||
.title("Title")
|
||||
.dropdown("Text", "Option 1", "Option 2")
|
||||
.input("Input", "placeholder")
|
||||
.toggle("Toggle")
|
||||
.slider("Text", 0, 10, 1, 5)
|
||||
```
|
||||
|
||||
## Components
|
||||
|
||||
Forms have different component types, most of them are limited to the CustomForm and some are available to everything but CustomForm.
|
||||
|
||||
### Button
|
||||
Limited to ModalForm and SimpleForm. With SimpleForm, buttons can have image icons and there can be more than 2.
|
||||
|
||||
### Dropdown
|
||||
Limited to CustomForm
|
||||
|
||||
### Input
|
||||
Limited to CustomForm.
|
||||
|
||||
### Label
|
||||
Limited to CustomForm.
|
||||
|
||||
### Slider
|
||||
Limited to CustomForm.
|
||||
|
||||
### Stepslider
|
||||
Limited to CustomForm.
|
||||
|
||||
### Toggle
|
||||
Limited to CustomForm.
|
||||
|
||||
## Sending a form
|
||||
|
||||
After you decided which form type you want to use and finished filling in the actual content, it's time to send the Form to the Bedrock player.<br>
|
||||
You can do that by calling the API and send a form to the player's UUID and the form:
|
||||
```java
|
||||
FloodgateApi.getInstance().sendForm(uuid, form); // or #sendForm(uuid, formBuilder)
|
||||
```
|
||||
Or you can do it by using the Player's FloodgatePlayer instance:
|
||||
```java
|
||||
FloodgatePlayer player = FloodgateApi.getInstance().getPlayer(uuid);
|
||||
player.sendForm(form); // or #sendForm(formBuilder)
|
||||
```
|
||||
So you can make and send forms in a pretty compact way by doing something like this:
|
||||
```java
|
||||
FloodgatePlayer player = FloodgateApi.getInstance().getPlayer(uuid);
|
||||
...
|
||||
player.sendForm(
|
||||
new CustomForm.Builder()
|
||||
.title("My cool title")
|
||||
.content("10/10 content")
|
||||
));
|
||||
```
|
||||
|
||||
## Receiving a response from the client
|
||||
|
||||
It's nice and all that we can send forms to a client, but we also want to be able to get a response from a client and being able to handle them.<be>
|
||||
We can do that using the `responseHandler(BiConsumer<? extends Form, String>)` method in the FormBuilder:
|
||||
```java
|
||||
_Modal_Form.builder()
|
||||
.title("Feedback form")
|
||||
.content("We're asking for feedback, are you willing to enter some feedback to improve our server?")
|
||||
.button1("Yes") // id = 0
|
||||
.button2("No") // id = 1
|
||||
.responseHandler((form, responseData) -> {
|
||||
_Modal_FormResponse response = form.parseResponse(responseData);
|
||||
if (!response.isCorrect()) {
|
||||
// player closed the form or returned invalid info (see FormResponse)
|
||||
return;
|
||||
}
|
||||
|
||||
// short version of getClickedButtonId == 0
|
||||
if (response.getResult()) {
|
||||
System.out.println("Yay, he wants to give us feedback");
|
||||
return;
|
||||
}
|
||||
System.out.println("No feedback for us :(");
|
||||
});
|
||||
```
|
||||
Or using the response handler setter of the Form (not a FormBuilder):
|
||||
```java
|
||||
_Modal_Form form = ...;
|
||||
form.setResponseHandler(responseData -> {
|
||||
_Modal_FormResponse response = form.parseResponse(responseData);
|
||||
if (!response.isCorrect()) {
|
||||
// player closed the form or returned invalid info (see FormResponse)
|
||||
return;
|
||||
}
|
||||
|
||||
// short version of getClickedButtonId == 0
|
||||
if (response.getResult()) {
|
||||
System.out.println("Yay, he wants to give us feedback");
|
||||
return;
|
||||
}
|
||||
System.out.println("No feedback for us :(");
|
||||
});
|
||||
```
|
||||
|
||||
## Advanced stuff
|
||||
|
||||
The FormBuilder also has support for translating the data used in the builder.<br>
|
||||
To add a translator, you can use the `translator(BiFunction<String, String, String>)` or the `translator(BiFunction<String, String, String>, String)` method:
|
||||
```java
|
||||
_Modal_Form form = _Modal_Form.builder()
|
||||
.translator(this::translate, userLanguage)
|
||||
.title("Title")
|
||||
.content("Content")
|
||||
.button1("translate.button1")
|
||||
.button2("translate.button2")
|
||||
.build();
|
||||
|
||||
public String translate(String key, String locale) {
|
||||
// this method will be called for every string, in this case, 4 times:
|
||||
// Title, Content, translate.button1, translate.button2
|
||||
// your own translate logic here
|
||||
// return the value that replaces the key
|
||||
}
|
||||
```
|
||||
Or you can have the translate method directly in the FormBuilder instead of a separate method:
|
||||
```java
|
||||
_Modal_Form form = _Modal_Form.builder()
|
||||
.translator((key, unused) -> {
|
||||
// this method will be called for every string, in this case, 4 times:
|
||||
// Title, Content, translate.button1, translate.button2
|
||||
// since this isn't a separate method, you don't need the locale argument, so it's unused.
|
||||
// your own translate logic here
|
||||
// return the value that replaces the key
|
||||
})
|
||||
.title("Title")
|
||||
.content("Content")
|
||||
.button1("translate.button1")
|
||||
.button2("translate.button2")
|
||||
.build();
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
layout: page
|
||||
title: Issues
|
||||
permalink: /floodgate/issues/
|
||||
---
|
||||
|
||||
# Known Issues & Caveats
|
||||
If an issue you're experiencing is not listed here, please consider joining the Geyser [Discord](http://discord.geysermc.org/).
|
||||
|
||||
## Running commands
|
||||
In some instances, like if you have the `username-prefix` set to `*`, you may need to wrap the Bedrock player's username in quotes; for example: `/tp "*BedrockPlayer"`. Setting the prefix to `.` should also fix this.
|
||||
|
||||
## If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
|
||||
It is likely you have enabled `send-floodgate-data` in your Floodgate config but either Floodgate isn't installed on the target server, or you floodgate key isn't the same between the installs of the plugin (please copy them so they all use the same key).
|
||||
|
||||
## `java.lang.IllegalStateException: Cannot reply to EncryptionRequestPacket without profile and access token.`
|
||||
|
||||
Make sure the server has Floodgate installed and started up correctly. Otherwise, see if the next line fixes your error.
|
||||
|
||||
## `javax.crypto.AEADBadTagException: Tag mismatch!`
|
||||
|
||||
If Geyser and Floodgate are on the same server, shut down your server, delete the `floodgate` plugin folder, delete any key file in the Geyser folder, and restart your server.
|
||||
If Geyser and Floodgate are not on the same server and you had to copy the key file, this could also be an error related to uploading through FTP. Using ASCII will not work here, and you need to make sure you're on binary when uploading. We recommend using [WinSCP](https://winscp.net/eng/index.php) if you need to use FTP.
|
||||
|
||||
## java.lang.NumberFormatException: For input string: ""
|
||||
|
||||
You're trying to log in without an Xbox account. Floodgate requires an Xbox account to authenticate the Bedrock player.
|
||||
|
||||
## Geyser-Floodgate:51777 lost connection: Internal Exception: java.lang.NumberFormatException: For input string: "SfqdXv36" (or a similar error)
|
||||
|
||||
Set `ip-forwarding` in your BungeeCord to `true`.
|
||||
|
||||
## "Please connect through the official Geyser" disconnect message
|
||||
|
||||
Ensure that Floodgate and Geyser are both up-to-date.
|
||||
|
||||
## Prefix is not changing on the server after changing it in the config.
|
||||
|
||||
Between the Paper builds of 1.15.2-355 and 1.16.5-505, there was a bug where Floodgate players who had already connected to the server would not have their prefixed changed. Paper builds 1.16.5-506 and later fix this issue.
|
||||
|
||||
Ensure that you removed the `usercache.json` file from the server root directory and restart your server.
|
||||
|
||||
## Issues with LuckPerms and prefixes
|
||||
|
||||
Set `allow-invalid-usernames` to `true` in LuckPerms' config.
|
||||
|
||||
## Error with Forge or Fabric Bukkit Hybrid
|
||||
|
||||
At this time, there is no way to run Floodgate on servers that mix Forge and Bukkit or Fabric and Bukkit (For example: Magma, Mohist, and Cardboard/Bukkit4Fabric) - most hybrids do not support the complicated procedures we need to do in order to allow Bedrock players to connect (for the technically minded: these server softwares typically don't support NMS).
|
||||
|
||||
If you wish to use Floodgate in combination with hybrid servers, we recommend putting these servers behind a BungeeCord or Velocity proxy, and running Floodgate on the proxy.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
layout: page
|
||||
title: FloodgatePlayer
|
||||
permalink: /floodgate/player/
|
||||
---
|
||||
|
||||
FloodgatePlayer is something that every player who's connect through Floodgate has.<br>
|
||||
It contains information about the Bedrock client which can be useful in various situations.
|
||||
|
||||
You can get a FloodgatePlayer by using the `FloodgateApi#getPlayer(uuid)` method (where uuid is the unique id of the connected player)
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: page
|
||||
title: Floodgate
|
||||
permalink: /floodgate/
|
||||
---
|
||||
|
||||
# Floodgate
|
||||
|
||||
[](LICENSE)
|
||||
[](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/)
|
||||
[](http://discord.geysermc.org/)
|
||||
[](http://hits.dwyl.com/GeyserMC/Floodgate)
|
||||
|
||||
Hybrid mode plugin to allow for connections from [Geyser](https://github.com/GeyserMC/Geyser) to join online mode servers.
|
||||
|
||||
Geyser is an open collaboration project by [CubeCraft Games](https://cubecraft.net).
|
||||
|
||||
See the [Floodgate](https://github.com/GeyserMC/Geyser/wiki/Floodgate) page in the Geyser Wiki for more info about the what Floodgate is, how you setup Floodgate and known issues/caveats.
|
||||
|
||||
See the [Floodgate wiki](https://github.com/GeyserMC/Floodgate/wiki) (currently work in progress) for a more in-depth look into Floodgate, how it works and the Floodgate API.
|
||||
@@ -0,0 +1,78 @@
|
||||
---
|
||||
layout: page
|
||||
title: Floodgate Setup
|
||||
permalink: /floodgate/setup/
|
||||
---
|
||||
|
||||
## Downloads:
|
||||
|
||||
Floodgate 2.0: https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/
|
||||
Geyser: https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- You must own/manage the server in order to add Floodgate. *If you do not own the server, Floodgate does not allow you to bypass logging into Java servers that require a Mojang Java account*.
|
||||
- You must either be running Geyser as a [plugin](https://github.com/GeyserMC/Geyser/wiki/Setup#plugin-setup), or be running [Geyser Standalone](https://github.com/GeyserMC/Geyser/wiki/Setup#Standalone-Setup). Floodgate does not replace Geyser.
|
||||
- You should make sure your Geyser is on the latest version (old versions of Geyser that worked with Floodgate 1.0 will not work with Floodgate 2.0)
|
||||
- `floodgate-spigot.jar` cannot be installed on CraftBukkit/Bukkit servers.
|
||||
|
||||
## Setting Up
|
||||
*Any reference to Spigot here also refers to any compatible server software such as Paper.*
|
||||
|
||||
For BungeeCord/Velocity setups: you only are required to install Floodgate on the BungeeCord or Velocity proxy unless you want to use the Floodgate API on the backend servers - see [below](installing-floodgate-also-on-spigot-servers-behind-bungeecord-or-velocity) for the installation process.
|
||||
*Note:* Installing Floodgate on the backend servers will allow Bedrock player skins to display without the Bedrock player having to switch backend servers.
|
||||
|
||||
- Download the Floodgate plugin from [here](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/) and add it to your plugins folder on your frontend server.
|
||||
- `floodgate-spigot.jar` for Spigot, Paper, etc
|
||||
- `floodgate-bungee.jar` for BungeeCord, Waterfall, etc
|
||||
- `floodgate-velocity.jar` for Velocity
|
||||
- Change the `auth-type` in the Geyser config to `floodgate`.
|
||||
- Restart/start up the server.
|
||||
|
||||
**ONLY do this step if using Geyser Standalone:**
|
||||
- *Copy* the `key.pem` file in the Floodgate config folder to the same directory as Geyser Standalone. **DO NOT DISTRIBUTE THIS KEY TO ANYBODY!** This key is what allows for Bedrock accounts to bypass the Java Edition authentication, and if anyone gets ahold of this, they can wreak havoc on your server.
|
||||
|
||||
### Installing Floodgate also on Spigot servers behind BungeeCord or Velocity
|
||||
|
||||
This is only needed when you want to use the Floodgate API on your Spigot server(s) behind a proxy.
|
||||
|
||||
- Install Floodgate on the proxy and on *all* backend servers as per the [previous insructions](#setting-up)
|
||||
- Enable `ip_forward` in your BungeeCord `config.yml` if using BungeeCord
|
||||
- Set `bungeecord` to `true` in your `spigot.yml`
|
||||
- Start the proxy server.
|
||||
- Edit the Floodgate config on your proxy server and set `send-floodgate-data` to `true`.
|
||||
- *Copy* the `key.pem` file in the proxy Floodgate config folder to all Spigot servers' Floodgate config folder. **DO NOT DISTRIBUTE THIS KEY TO ANYBODY!** This key is what allows for Bedrock accounts to bypass the Java Edition authentication, and if anyone gets ahold of this, they can wreak havoc on your server.
|
||||
- Restart the Spigot servers and proxy server.
|
||||
|
||||
## How do I migrate from Floodgate 1.0 to Floodgate 2.0?
|
||||
Floodgate 2.0 is not compatible with Floodgate 1.0 and Floodgate 1.0 is not compatible with Floodgate 2.0, which means there may be some manual upgrading required. When Floodgate 2.0 is loaded for the first time (on your server), it will try to convert the Floodgate 1.0 config to a Floodgate 2.0 config and it will generate a new key (the old one can be found under `old-key.pem`). Floodgate 2.0 uses a different algorithm for the key and because of that, you now only have one key (called `key.pem`) instead of two. You will have to copy the new Floodgate key (like you had to do in the initial startup) to all the servers that use Floodgate, including Geyser-Standalone.<br>
|
||||
|
||||
Probably not everyone will understand what has been said, so here is a step-by-step guide:
|
||||
1. Replace Geyser with the [latest version](https://ci.opencollab.dev/job/GeyserMC/job/Geyser/job/master/) (builds of Geyser that worked with floodgate 1.0, don't work) and replace every server that uses Floodgate with the [latest version](https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/).
|
||||
2. Restart **one** server that uses Floodgate and let Floodgate update the config and generate a new `key.pem` file.
|
||||
3. Look at the Floodgate configuration of that server and check if `config-version` is present in the Floodgate config. If it isn't, you have not installed Floodgate 2.0. While you are there, please decide if you want to continue using the legacy player name prefix `*` or use one of the recommended prefixes: `.` (the new default), `+` or `-`. All those new prefixes are easier to use for commands since you don't have to wrap the player's name in quotes.
|
||||
4. Copy the files: `config.yml` and `key.pem` to all your servers that use Floodgate.
|
||||
5. If you are using Geyser-Standalone, only copy `key.pem` to the Geyser-Standalone folder.
|
||||
6. Make sure that you edit the Geyser config to point to `key.pem` instead of `public-key.pem` (the setting is`floodgate-key-file`).
|
||||
7. Restart the other servers and check for errors.
|
||||
8. Try to join Geyser with one account to check if everything works as expected. If it doesn't, please make sure that you followed every step correctly. If you did everything correctly and it still doesn't work, join our Discord to get support.
|
||||
|
||||
Depending on if you want to keep using [Global Linking](Features#What-is-Global-Linking), which is enabled by default, you should be ready to go.
|
||||
|
||||
To migrate your Floodgate 1.0 local account linking database, follow [these](Features#Local-Linking) steps.
|
||||
|
||||
## Changing/disabling the prefix
|
||||
|
||||
***Please note: we do not recommend removing the prefix unless you are certain that no one will share a username between a Java and Bedrock player. Duplicated usernames will cause weird situations, like being unable to teleport to one of the players.***
|
||||
|
||||
In your Floodgate config, change `username-prefix` to whichever prefix you desire - you can set it to `""` and there will be no prefix.
|
||||
|
||||
On some older Paper servers (or any forks that use them), you may need to also shut down your server and delete your `usercache.json` file located in the same folder as your server jar to prevent users who already joined from having the old prefix. See [this issue](Issues#Prefix-is not-changing-on-the-server-after-changing-it in-the-config.) for more information.
|
||||
|
||||
## Obtaining UUIDs for Floodgate players
|
||||
Check your server logs, or use [this](https://floodgate-uuid.heathmitchell1.repl.co/) page. If this doesn't work, then try this method:
|
||||
|
||||
First, you'll need to get the XUID of the player. There are several third-party websites to find this, for example, this one (unaffiliated with Geyser). Make sure to choose "Hexidecimal." You'll need to enter the player's Xbox Gamertag, and, once submitted, and it should display the XUID in the format of `xxxxxxxxxxxxxxxx`. To turn the XUID into a UUID that Java Edition can recognize, you need to put the XUID in this format: `00000000-0000-0000-xxxx-xxxxxxxxxxxx`. If formatted right, Java Edition should accept it as a UUID.
|
||||
|
||||
## Using PlaceholderAPI
|
||||
If you're using the Bukkit version of Floodgate, download the Placeholder plugin [here](https://github.com/rtm516/FloodgatePlaceholders/). Using the placeholders shouldn't require additional setup other than having [PlaceholderAPI](https://www.spigotmc.org/resources/place
|
||||
Reference in new issue
Block a user