From 948613876e8239863ef9a7ce077184b1314efc2a Mon Sep 17 00:00:00 2001 From: TuxCoding <1957196+TuxCoding@users.noreply.github.com> Date: Tue, 5 May 2026 13:41:10 +0200 Subject: [PATCH] [CI-SKIP] Add technical diagrams --- CONTRIBUTING.md | 71 +++++++++++++++++++ README.md | 38 ++++++++-- .../bungee/listener/ConnectListener.java | 2 +- 3 files changed, 105 insertions(+), 6 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..13edff33 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,71 @@ +# Contributing Guide + +## Architectural overview + +```mermaid +graph TB + subgraph "Minecraft Server Platforms" + SPIGOT["Spigot/Paper
(Bukkit Module)"] + BUNGEE["BungeeCord
(Proxy Module)"] + VELOCITY["Velocity
(Velocity Module)"] + end + + subgraph "FastLogin Core" + CORE["FastLoginCore
Main Logic Engine"] + SESSION["LoginSession
Session Management"] + AUTH["AuthPlugin Hook
Auth Integration"] + RESOLVER["ProxyAgnosticMojangResolver
Profile Resolution"] + STORAGE["SQLStorage
Database Layer"] + ANTIBOT["AntiBotService
Rate Limiting"] + end + + subgraph "Bedrock Support" + FLOODGATE["FloodgateManagement
Bedrock Players"] + GEYSER["GeyserService
Geyser Integration"] + BEDROCK["BedrockService
Base Service"] + end + + subgraph "External Services" + MOJANG["Mojang API
api.mojang.com"] + SESSION_SERVER["Session Server
sessionserver.mojang.com"] + DATABASE[(SQL Database
MySQL/SQLite)] + end + + subgraph "Async Processing" + SCHEDULER["AbstractAsyncScheduler
Thread Pool Management"] + end + + subgraph "Messaging" + MESSAGES["ChannelMessage
Proxy Messages
(i.e. BungeeCord)"] + NAMEKEY["NamespaceKey
Message Routing"] + end + + SPIGOT -->|loads| CORE + BUNGEE -->|loads| CORE + VELOCITY -->|loads| CORE + + CORE -->|manages| SESSION + CORE -->|uses| AUTH + CORE -->|resolves profiles| RESOLVER + CORE -->|persists data| STORAGE + CORE -->|checks rate limits| ANTIBOT + CORE -->|handles bedrock| FLOODGATE + + FLOODGATE -->|extends| BEDROCK + GEYSER -->|extends| BEDROCK + + RESOLVER -->|queries| MOJANG + RESOLVER -->|verifies| SESSION_SERVER + + STORAGE -->|connects to| DATABASE + + CORE -->|schedules async| SCHEDULER + + MESSAGES -->|uses| NAMEKEY + CORE -->|sends via| MESSAGES + + AUTH -.->|delegates to| SPIGOT + AUTH -.->|delegates to| BUNGEE + + ANTIBOT -->|rate limits| RESOLVER +``` diff --git a/README.md b/README.md index b001a2ec..197c50d5 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,42 @@ Development builds contain the latest changes from the Source-Code. They are ble but also include features, enhancements and bug fixes that are not yet in a released version. If you click on the left side on `Changes`, you can see iterative change sets leading to a specific build. -~~You can download them from here: [CodeMC(Jenkins)](https://ci.codemc.org/job/Games647/job/FastLogin/)~~ - -Currently broken due changed usernames. Download it from [here](https://github.com/TuxCoding/FastLogin/releases) - - +You can download them from here: [CodeMC(Jenkins)](https://ci.codemc.org/job/Games647/job/FastLogin/) *** +## Technical Authentication + +```mermaid +sequenceDiagram + autonumber + participant C as Client + participant S as Server + participant M as Mojang + + C->>S: LOGIN_START (name) + Note over S: DB: check if username is saved as premium + S->>C: ENCRYPTION_REQUEST + Note right of C: Offline clients terminates connection here + Note right of C: In Offlinemode: LOGIN_SUCCESS is sent directly + + rect rgb(240, 240, 240) + C->>M: POST /session/minecraft/join + C->>S: ENCRYPTION_RESPONSE + Note right of C: Client starts encrypting + end + + Note over S: Decrypt and verify token + S->>M: GET /hasJoined (async) + M->>S: {uuid, name, skin} + + Note over S: Server encrypts traffic + Note over S: Inject skin and premium UUID + S->>S: Re-inject LOGIN_START(name) + + S->>C: LOGIN_SUCCESS +``` + ## Commands /premium [player] Label the invoker or the argument as paid account diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java index afdd6a7e..807ddbc1 100644 --- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java +++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/listener/ConnectListener.java @@ -235,7 +235,7 @@ public class ConnectListener implements Listener { // delay sending force command, because Paper will process the login event asynchronously // In this case it means that the force command (plugin message) is already received and processed while - // player is still in the login phase and reported to be offline. + // player is still in the login phase and reported to be offline Runnable loginTask = new ForceLoginTask(plugin.getCore(), player, server, session); plugin.getScheduler().runAsync(loginTask); }