# 254nm/l2x9antibot architecture

> Architecture diagram of the GitHub repository 254nm/l2x9antibot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/254nm/l2x9antibot
- Repository: https://github.com/254nm/l2x9antibot

## Overview

L2X9AntiBot is a Bukkit plugin that gates new players behind web-based CAPTCHA verification. On join, unverified players receive a timed prompt; the web submission checks Google reCAPTCHA and records successful verification. Event listeners restrict unverified players, while commands let authorized staff verify, unverify, or reload configuration. The excerpts show startup wiring and core calls; the resource templates and configuration are represented, but their contents were not provided.

Main entry points: [`src/main/java/org/l2x9/antibot/AntiBot.java`](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/AntiBot.java) (Plugin Startup), [`src/main/java/org/l2x9/antibot/util/Utils.java`](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/Utils.java) (Verification Utilities), [`src/main/java/org/l2x9/antibot/util/FileUtils.java`](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/FileUtils.java) (File Utilities), [`src/main/java/org/l2x9/antibot/webserver/Pages.java`](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/webserver/Pages.java) (HTTP Pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Join Enforcement"]
  node_plugin["Plugin Startup<br/>[AntiBot.java]"]
  node_join["Join Handler<br/>[PlayerJoin.java]"]
  node_countdown["Verification Timer<br/>[CountDown.java]"]
  node_chat["Chat Guard<br/>[ChatEvent.java]"]
  node_commandguard["Command Guard<br/>[CommandEvent.java]"]
  node_move["Movement Guard<br/>[MoveEvent.java]"]
end

subgraph group_staff["Staff Commands"]
  node_verify["Verify Command<br/>[VerifyCommand.java]"]
  node_unverify["Unverify Command"]
  node_reload["Reload Command<br/>[ReloadConfig.java]"]
end

subgraph group_web["Web Verification"]
  node_pages["HTTP Pages<br/>[Pages.java]"]
  node_templates["Page Templates"]
end

subgraph group_state["Verification State"]
  node_utils["Verification Utilities<br/>[Utils.java]"]
  node_files["File Utilities<br/>[FileUtils.java]"]
  node_verifieddata[("Verified Players<br/>[verified.yml]")]
  node_config["Plugin Configuration<br/>[config.yml]"]
end

node_player(("Player"))
node_admin(("Staff Admin"))
node_captcha["Google reCAPTCHA"]

node_player -->|"joins server"| node_join
node_plugin -->|"registers listener"| node_join
node_plugin -->|"registers listener"| node_chat
node_plugin -->|"registers listener"| node_commandguard
node_plugin -->|"registers listener"| node_move
node_join -->|"schedules"| node_countdown
node_join -->|"checks and messages"| node_utils
node_countdown -->|"checks and messages"| node_utils
node_chat -->|"checks status"| node_utils
node_commandguard -->|"checks status"| node_utils
node_move -->|"checks status"| node_utils
node_plugin -->|"registers command"| node_verify
node_plugin -->|"registers command"| node_unverify
node_plugin -->|"registers command"| node_reload
node_verify -->|"verifies player"| node_utils
node_unverify -->|"unverifies player"| node_utils
node_admin -.->|"runs command"| node_verify
node_admin -.->|"runs command"| node_unverify
node_admin -.->|"runs command"| node_reload
node_plugin -->|"initializes files"| node_files
node_plugin -->|"registers HTTP handlers"| node_pages
node_pages -->|"validates response"| node_captcha
node_pages -->|"verifies and responds"| node_utils
node_pages -->|"loads page files"| node_files
node_files -->|"copies defaults"| node_templates
node_utils -->|"reads and saves"| node_files
node_files -->|"loads template"| node_verifieddata
node_plugin -.->|"loads defaults"| node_config

click node_plugin "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/AntiBot.java"
click node_join "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/PlayerJoin.java"
click node_countdown "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/CountDown.java"
click node_chat "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/ChatEvent.java"
click node_commandguard "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/CommandEvent.java"
click node_move "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/MoveEvent.java"
click node_verify "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/commands/VerifyCommand.java"
click node_unverify "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/commands/UnVerifyCommand.java"
click node_reload "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/commands/ReloadConfig.java"
click node_pages "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/webserver/Pages.java"
click node_templates "https://github.com/254nm/l2x9antibot/tree/master/src/main/resources"
click node_utils "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/Utils.java"
click node_files "https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/FileUtils.java"
click node_verifieddata "https://github.com/254nm/l2x9antibot/blob/master/src/main/resources/verified.yml"
click node_config "https://github.com/254nm/l2x9antibot/blob/master/src/main/resources/config.yml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_join,node_countdown,node_chat,node_commandguard,node_move toneBlue
class node_verify,node_unverify,node_reload toneAmber
class node_pages,node_templates toneMint
class node_utils,node_files,node_verifieddata,node_config toneRose
class node_player,node_admin,node_captcha toneIndigo
```

## Components

### Join Enforcement

- [Plugin Startup](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/AntiBot.java): `src/main/java/org/l2x9/antibot/AntiBot.java`
- [Join Handler](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/PlayerJoin.java): `src/main/java/org/l2x9/antibot/events/PlayerJoin.java`
- [Verification Timer](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/CountDown.java): `src/main/java/org/l2x9/antibot/util/CountDown.java`
- [Chat Guard](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/ChatEvent.java): `src/main/java/org/l2x9/antibot/events/ChatEvent.java`
- [Command Guard](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/CommandEvent.java): `src/main/java/org/l2x9/antibot/events/CommandEvent.java`
- [Movement Guard](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/events/MoveEvent.java): `src/main/java/org/l2x9/antibot/events/MoveEvent.java`

### Staff Commands

- [Verify Command](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/commands/VerifyCommand.java): `src/main/java/org/l2x9/antibot/commands/VerifyCommand.java`
- [Unverify Command](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/commands/UnVerifyCommand.java): `src/main/java/org/l2x9/antibot/commands/UnVerifyCommand.java`
- [Reload Command](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/commands/ReloadConfig.java): `src/main/java/org/l2x9/antibot/commands/ReloadConfig.java`

### Web Verification

- [HTTP Pages](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/webserver/Pages.java): `src/main/java/org/l2x9/antibot/webserver/Pages.java`
- [Page Templates](https://github.com/254nm/l2x9antibot/tree/master/src/main/resources): `src/main/resources`

### Verification State

- [Verification Utilities](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/Utils.java): `src/main/java/org/l2x9/antibot/util/Utils.java`
- [File Utilities](https://github.com/254nm/l2x9antibot/blob/master/src/main/java/org/l2x9/antibot/util/FileUtils.java): `src/main/java/org/l2x9/antibot/util/FileUtils.java`
- [Verified Players](https://github.com/254nm/l2x9antibot/blob/master/src/main/resources/verified.yml): `src/main/resources/verified.yml`
- [Plugin Configuration](https://github.com/254nm/l2x9antibot/blob/master/src/main/resources/config.yml): `src/main/resources/config.yml`

### Other components

- **Player**
- **Staff Admin**
- **Google reCAPTCHA**

## Connections

- Player → Join Handler: joins server (evidence: `src/main/java/org/l2x9/antibot/events/PlayerJoin.java`)
- Plugin Startup → Join Handler: registers listener (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Plugin Startup → Chat Guard: registers listener (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Plugin Startup → Command Guard: registers listener (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Plugin Startup → Movement Guard: registers listener (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Join Handler → Verification Timer: schedules (evidence: `src/main/java/org/l2x9/antibot/events/PlayerJoin.java`)
- Join Handler → Verification Utilities: checks and messages (evidence: `src/main/java/org/l2x9/antibot/events/PlayerJoin.java`)
- Verification Timer → Verification Utilities: checks and messages (evidence: `src/main/java/org/l2x9/antibot/util/CountDown.java`)
- Chat Guard → Verification Utilities: checks status (evidence: `src/main/java/org/l2x9/antibot/events/ChatEvent.java`)
- Command Guard → Verification Utilities: checks status (evidence: `src/main/java/org/l2x9/antibot/events/CommandEvent.java`)
- Movement Guard → Verification Utilities: checks status (evidence: `src/main/java/org/l2x9/antibot/events/MoveEvent.java`)
- Plugin Startup → Verify Command: registers command (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Plugin Startup → Unverify Command: registers command (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Plugin Startup → Reload Command: registers command (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Verify Command → Verification Utilities: verifies player (evidence: `src/main/java/org/l2x9/antibot/commands/VerifyCommand.java`)
- Unverify Command → Verification Utilities: unverifies player (evidence: `src/main/java/org/l2x9/antibot/commands/UnVerifyCommand.java`)
- Staff Admin → Verify Command: runs command
- Staff Admin → Unverify Command: runs command
- Staff Admin → Reload Command: runs command
- Plugin Startup → File Utilities: initializes files (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- Plugin Startup → HTTP Pages: registers HTTP handlers (evidence: `src/main/java/org/l2x9/antibot/AntiBot.java`)
- HTTP Pages → Google reCAPTCHA: validates response (evidence: `src/main/java/org/l2x9/antibot/webserver/Pages.java`)
- HTTP Pages → Verification Utilities: verifies and responds (evidence: `src/main/java/org/l2x9/antibot/webserver/Pages.java`)
- HTTP Pages → File Utilities: loads page files (evidence: `src/main/java/org/l2x9/antibot/webserver/Pages.java`)
- File Utilities → Page Templates: copies defaults (evidence: `src/main/java/org/l2x9/antibot/util/FileUtils.java`)
- Verification Utilities → File Utilities: reads and saves (evidence: `src/main/java/org/l2x9/antibot/util/Utils.java`)
- File Utilities → Verified Players: loads template (evidence: `src/main/java/org/l2x9/antibot/util/FileUtils.java`)
- Plugin Startup → Plugin Configuration: loads defaults
