From 26800288e504716457c108d18b7384501408ce05 Mon Sep 17 00:00:00 2001
From: Jens Collaert <63231928+Jens-Co@users.noreply.github.com>
Date: Fri, 13 May 2022 13:45:04 +0200
Subject: [PATCH] Linking page fix & local serve fix (#45)
---
Gemfile | 1 +
Gemfile.lock | 2 ++
_data/toc.yml | 9 ++++----
_docs/floodgate/features.md | 44 ------------------------------------
_docs/floodgate/linking.md | 45 ++++++++++++++++++++++++++++++++++++-
5 files changed, 52 insertions(+), 49 deletions(-)
diff --git a/Gemfile b/Gemfile
index 1d7a3a7..d70c9b0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -12,6 +12,7 @@ source "https://rubygems.org"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
# gem "minima"
+gem 'webrick'
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
diff --git a/Gemfile.lock b/Gemfile.lock
index 84226f4..22f6827 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -279,6 +279,7 @@ GEM
unf_ext (0.0.8)
unf_ext (0.0.8-x64-mingw32)
unicode-display_width (1.8.0)
+ webrick (1.7.0)
zeitwerk (2.5.4)
PLATFORMS
@@ -287,6 +288,7 @@ PLATFORMS
DEPENDENCIES
github-pages
+ webrick
BUNDLED WITH
2.2.32
diff --git a/_data/toc.yml b/_data/toc.yml
index 8b87e99..8f42672 100644
--- a/_data/toc.yml
+++ b/_data/toc.yml
@@ -55,10 +55,6 @@
url: "floodgate/features/#whitelist-command"
- title: Global Api
url: "floodgate/features/#what-is-the-global-api"
- - title: Global Linking
- url: "floodgate/features/#what-is-global-linking"
- - title: Local Linking
- url: "floodgate/features/#local-linking"
- title: Skin Uploading
url: "floodgate/features/#what-is-skin-uploading"
- title: "Floodgate API"
@@ -67,6 +63,11 @@
url: "floodgate/player/"
- title: "Linking"
url: "floodgate/linking/"
+ children:
+ - title: Global Linking
+ url: "floodgate/linking/#what-is-global-linking"
+ - title: Local Linking
+ url: "floodgate/linking/#local-linking"
- title: "Forms and Cumulus"
url: "floodgate/forms/"
- title: "Commands"
diff --git a/_docs/floodgate/features.md b/_docs/floodgate/features.md
index 83ccd2c..c23f1fd 100644
--- a/_docs/floodgate/features.md
+++ b/_docs/floodgate/features.md
@@ -18,50 +18,6 @@ The permission node is `floodgate.command.whitelist`.
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.
-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 `
-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.
diff --git a/_docs/floodgate/linking.md b/_docs/floodgate/linking.md
index 579fb08..7055e3a 100644
--- a/_docs/floodgate/linking.md
+++ b/_docs/floodgate/linking.md
@@ -4,4 +4,47 @@ title: Linking
permalink: /floodgate/linking/
---
-## TODO
+## 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.
+Global Linking is part of the [Global Api](https://wiki.geysermc.org/floodgate/features/#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 `
+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`.