initial docuasarus and tweaks

This commit is contained in:
Chew committed 2023-11-07 19:40:55 -06:00
1 parent 57cc85d951
commit 8576839fee
224 files changed
+45653 -368

No files matched your search

+52
View File
@@ -0,0 +1,52 @@
---
title: 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](/geyser/forms/)
This page will contain information about class FloodgateApi.
See the sidebar for more information about other parts of the API.
### Accessing the Floodgate API
See [here](/geyser/getting-started-with-the-api) for how to include the Floodgate API in your project.
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.
To access it, you simply type:
```java
FloodgateApi.getInstance();
```
After you got the instance, you have access to all the methods.
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).
:::note
To see full, detailed documentation, see the [javadocs](https://repo.opencollab.dev/javadoc/maven-snapshots/org/geysermc/floodgate/api/2.2.2-SNAPSHOT).
:::
#### We'll highlight a few to get you started quickly:
`FloodgateApi#isFloodgatePlayer(UUID)`
Used to check if the given UUID of an **online** player is a Bedrock player.
`FloodgateApi#getPlayer(UUID)`
Used to get the FloodgatePlayer instance of an **online** player.
Click [here](/floodgate/player/) 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.
You can even use them in the pre-login events.
`FloodgateApi#getPlayerLink()`
Used to get the PlayerLink instance used by Floodgate to check for linked accounts.
Click [here](/floodgate/linking/) to get more information about the PlayerLink class
`FloodgateApi#sendForm(UUID, Form(Builder))`
Used to send a form to the Bedrock player with the given UUID.
Click [here](/geyser/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.
+9
View File
@@ -0,0 +1,9 @@
---
title: Commands
---
| Command | Permission | Description |
|:---:|:---:|:---:|
| `fwhitelist` | `floodgate.command.fwhitelist` | Whitelist command for Floodgate players. See [here](/floodgate/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. |
+24
View File
@@ -0,0 +1,24 @@
---
title: FAQ
---
# FAQ
## 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](/floodgate/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://uuid.kejona.dev/) 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](https://www.cxkes.me/xbox/xuid) (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 Spigot 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/6245/) installed. See the section above on installing Floodgate on backend servers if you wish to use this on BungeeCord.
## Using Skript
If you're using the Spigot version of Floodgate, there is an unofficial plugin that adds Skript support [here](https://github.com/kejonaMC/floodgate-skript).
+23
View File
@@ -0,0 +1,23 @@
---
title: 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.fwhitelist`.
## 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](/geyser/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.
We're using MineSkin internally. MineSkin is running on accounts donated by the community. So if you want to support MineSkin and make the upload times faster, feel free to look at [this page](https://mineskin.org/account) for more info.
![Example skin upload](/img/wiki/skin_upload_example.png)
+59
View File
@@ -0,0 +1,59 @@
---
title: 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 your 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) 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.
## Failed to verify username! (with Paper)
To completely mitigate this issue, disable `perform-username-validation` in the [unsupported settings of the `config/paper-global.yml` file](https://paper.readthedocs.io/en/latest/server/configuration.html#unsupported_settings) (`paper.yml` in the root server folder on servers below 1.19). Using Floodgate on the backend servers will also mitigate this issue.
## 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.
## After enabling global linking in offline mode, player data is not synced between Java and Bedrock players.
This occurs in offline mode because the UUID of the Java account linked to the Bedrock account does not match the online mode UUID returned by Floodgate's global linking server.
When using global linking, ensure `online-mode` in `server.properties` is set to `true`. Otherwise, Bedrock players will not be authenticated with the same UUID they receive when playing on Java Edition, resulting in lost progress. This does not occur with local linking.
+54
View File
@@ -0,0 +1,54 @@
---
title: Linking
---
## What is Global Linking?
Instructions and information about how to link can also be found here: [https://link.geysermc.org/](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.
Keep in mind: While having your accounts linked, you will use the Java account's location, inventory data, and achievements etc. regardless of which platform you sign in from (therefore, "synchronising" the player data). The player data from the Bedrock account will not be accessible until you unlink again. As a result, you should transfer everything (ender chest contents, items, armor) to the Java account before linking to not "lose" your Bedrock progress. If you forgot to do this, you can unlink, transfer everything over, and link again.
Global Linking is part of the [Global Api](/geyser/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.
To unlink your globally linked accounts, join the GlobalLinkServer (as described above for linking) on either Java or Bedrock, and use the `/unlinkaccount` command.
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/core/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`.
+8
View File
@@ -0,0 +1,8 @@
---
title: FloodgatePlayer
---
FloodgatePlayer is something that every player who's connect through Floodgate has.
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)
+14
View File
@@ -0,0 +1,14 @@
---
title: Floodgate
permalink: /floodgate/
---
# Floodgate
## What is Floodgate?
Floodgate is a hybrid mode plugin that allows Minecraft: Bedrock Accounts to join Minecraft: Java Edition servers without needing a Minecraft: Java Edition account.
This is something you install in addition to Geyser. Unlike Geyser, Floodgate can only be installed as a plugin on Spigot (including Paper and forks), Bungeecord, Velocity, and as a mod on Fabric servers, and can only be utilized on servers that have it installed.
## What has Floodgate 2.0 to offer?
Floodgate 2.0 is a rewrite of Floodgate 1.0, with various bugfixes and improvements. It also introduces new features: being able to [see Bedrock player skins on Java edition](/floodgate/features/#what-is-skin-uploading),
being able to [use Bedrock forms](/geyser/forms/), link your account once and login on every server that has [Global Linking](/floodgate/linking/#what-is-global-linking) enabled,
and the [Global Api](/geyser/global-api).
+82
View File
@@ -0,0 +1,82 @@
---
title: Floodgate Setup
page_sidebar: false
---
# Floodgate Setup
<div class="alert alert-warning" role="alert">
Floodgate does <b>NOT</b> replace Geyser! It allows Geyser players to join servers without needing to log into a paid Java Edition account.
</div>
[//]: # ()
[//]: # (<div class="nav nav-tabs setup-tabs" role="tablist" aria-label="Setup Options">)
[//]: # ( <li class="nav-item" role="presentation">)
[//]: # ( <a class="nav-link active" href="#" data-bs-toggle="tab" data-bs-target="#spigot-option" type="button" role="tab" aria-controls="spigot-option" aria-selected="false"><img src="/img/icons/paper.png" alt="paper icon"> Paper / Spigot</a>)
[//]: # ( </li>)
[//]: # ( <li class="nav-item" role="presentation">)
[//]: # ( <a class="nav-link" href="#" data-bs-toggle="tab" data-bs-target="#fabric-option" type="button" role="tab" aria-controls="fabric-option" aria-selected="false"><img src="/img/icons/fabric.png" alt="fabric icon"> Fabric</a>)
[//]: # ( </li>)
[//]: # ( <li class="nav-item" role="presentation">)
[//]: # ( <a class="nav-link" href="#" data-bs-toggle="tab" data-bs-target="#proxy-option" type="button" role="tab" aria-controls="proxy-option" aria-selected="false"><img src="/img/icons/velocity.svg" alt="velocity icon"> Proxy Servers</a>)
[//]: # ( </li>)
[//]: # ( <li class="nav-item" role="presentation">)
[//]: # ( <a class="nav-link" href="#" data-bs-toggle="tab" data-bs-target="#standalone-option" type="button" role="tab" aria-controls="standalone-option" aria-selected="false"><img src="/img/icons/geyser.png" alt="geyser icon"> Standalone</a>)
[//]: # ( </li>)
[//]: # ( </div>)
[//]: # ()
[//]: # ( <div class="tab-content mt-4">)
[//]: # ( <div id="spigot-option" class="tab-pane fade show active" role="tabpanel">)
[//]: # ( {% capture my_include %}{% include setup/instructions/floodgate/spigot.md %}{% endcapture %})
[//]: # ( {{ my_include | markdownify }})
[//]: # ( </div>)
[//]: # ( <div id="fabric-option" class="tab-pane fade" role="tabpanel">)
[//]: # ( {% capture my_include %}{% include setup/instructions/floodgate/fabric.md %}{% endcapture %})
[//]: # ( {{ my_include | markdownify }})
[//]: # ( </div>)
[//]: # ( <div id="proxy-option" class="tab-pane fade" role="tabpanel">)
[//]: # ( {% capture my_include %}{% include setup/instructions/floodgate/proxy.md %}{% endcapture %})
[//]: # ( {{ my_include | markdownify }})
[//]: # ( </div>)
[//]: # ( <div id="standalone-option" class="tab-pane fade" role="tabpanel">)
[//]: # ( {% capture my_include %}{% include setup/instructions/floodgate/standalone.md %}{% endcapture %})
[//]: # ( {{ my_include | markdownify }})
[//]: # ( </div>)
[//]: # (</div>)
<h4 class="mt-4">Further information:</h4>
<ul>
<li><a href="/floodgate/features/">Floodgate Features</a></li>
<li><a href="/floodgate/api/">Floodgate API</a></li>
</ul>