# theu5er/aliasplus architecture

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

- Interactive diagram: https://gitdiagram.com/theu5er/aliasplus
- Repository: https://github.com/theu5er/aliasplus

## Overview

Alias+ is a Nukkit-MOT plugin that links player accounts using device identifiers, resource-pack cache fingerprints, and BlobCache evidence. An operator queries a name, UUID, or XUID with `/alias`; online targets may undergo a blob scan before results are displayed. The same related-account data supports the developer query and immediate or delayed punishment APIs. The graph preserves the documented detection dimensions and the storage, packet, and fingerprint implementation layers; some initialization and packet-dispatch details are only partially excerpted.

Main entry points: [`src/main/java/com/altdetector/AltDetector.java`](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/AltDetector.java) (Plugin lifecycle and API), [`src/main/java/com/altdetector/blob/BlobDetector.java`](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/blob/BlobDetector.java) (BlobCache detector), [`src/main/java/com/altdetector/store/PlayerStore.java`](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/store/PlayerStore.java) (Player records), [`src/main/java/com/altdetector/command/AliasCommand.java`](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/command/AliasCommand.java) (Alias query)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Plugin and API"]
  node_plugin["Plugin lifecycle and API<br/>[AltDetector.java]"]
  node_alias["Alias query<br/>[AliasCommand.java]"]
end

subgraph group_detect["Account Detection"]
  node_blob["BlobCache detector<br/>[BlobDetector.java]"]
  node_pack["Pack-cache detector<br/>[PackDetector.java]"]
  node_fingerprint["Fingerprint pack"]
end

subgraph group_protocol["Cache Protocol"]
  node_blobstatus["Blob status decoder"]
  node_missresponse["Blob miss response"]
  node_hash["XXHash64<br/>[XxHash64.java]"]
end

subgraph group_state["Persistence and Punishment"]
  node_store[("Player records<br/>[PlayerStore.java]")]
  node_punish["Punishment queue<br/>[PunishManager.java]"]
end

node_operator(("Server operator"))
node_server["Nukkit-MOT server"]

node_operator -->|"queries accounts"| node_alias
node_alias -->|"requests relationships"| node_plugin
node_alias -->|"starts online scan"| node_blob
node_plugin -->|"loads and normalizes"| node_store
node_plugin -->|"initializes detector"| node_blob
node_plugin -.->|"initializes detector"| node_pack
node_plugin -->|"exposes punishment API"| node_punish
node_alias -->|"reads player records"| node_store
node_plugin -->|"queries blob matches"| node_blob
node_plugin -->|"queries identifiers and claims"| node_store
node_pack -->|"reads and records claims"| node_store
node_pack -->|"creates packs"| node_fingerprint
node_blob -->|"loads and saves IDs"| node_store
node_blob -->|"hashes blob data"| node_hash
node_blob -->|"handles status packets"| node_blobstatus
node_blob -->|"sends miss response"| node_missresponse
node_punish -->|"gets related accounts"| node_plugin
node_punish -->|"looks up display name"| node_store
node_punish -->|"dispatches commands"| node_server

click node_plugin "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/AltDetector.java"
click node_alias "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/command/AliasCommand.java"
click node_blob "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/blob/BlobDetector.java"
click node_pack "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/pack/PackDetector.java"
click node_fingerprint "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/pack/FingerprintPack.java"
click node_blobstatus "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/protocol/ClientCacheBlobStatusPacket.java"
click node_missresponse "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/protocol/ClientCacheMissResponsePacket.java"
click node_hash "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/util/XxHash64.java"
click node_store "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/store/PlayerStore.java"
click node_punish "https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/punish/PunishManager.java"

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_alias toneBlue
class node_blob,node_pack,node_fingerprint toneAmber
class node_blobstatus,node_missresponse,node_hash,node_operator,node_server toneMint
class node_store,node_punish toneRose
```

## Components

### Plugin and API

- [Plugin lifecycle and API](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/AltDetector.java): `src/main/java/com/altdetector/AltDetector.java`
- [Alias query](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/command/AliasCommand.java): `src/main/java/com/altdetector/command/AliasCommand.java`

### Account Detection

- [BlobCache detector](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/blob/BlobDetector.java): `src/main/java/com/altdetector/blob/BlobDetector.java`
- [Pack-cache detector](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/pack/PackDetector.java): `src/main/java/com/altdetector/pack/PackDetector.java`
- [Fingerprint pack](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/pack/FingerprintPack.java): `src/main/java/com/altdetector/pack/FingerprintPack.java`

### Cache Protocol

- [Blob status decoder](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/protocol/ClientCacheBlobStatusPacket.java): `src/main/java/com/altdetector/protocol/ClientCacheBlobStatusPacket.java`
- [Blob miss response](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/protocol/ClientCacheMissResponsePacket.java): `src/main/java/com/altdetector/protocol/ClientCacheMissResponsePacket.java`
- [XXHash64](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/util/XxHash64.java): `src/main/java/com/altdetector/util/XxHash64.java`

### Persistence and Punishment

- [Player records](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/store/PlayerStore.java): `src/main/java/com/altdetector/store/PlayerStore.java`
- [Punishment queue](https://github.com/theu5er/aliasplus/blob/main/src/main/java/com/altdetector/punish/PunishManager.java): `src/main/java/com/altdetector/punish/PunishManager.java`

### Other components

- **Server operator**
- **Nukkit-MOT server**

## Connections

- Server operator → Alias query: queries accounts (evidence: `README.md`)
- Alias query → Plugin lifecycle and API: requests relationships (evidence: `src/main/java/com/altdetector/command/AliasCommand.java`)
- Alias query → BlobCache detector: starts online scan (evidence: `src/main/java/com/altdetector/command/AliasCommand.java`)
- Plugin lifecycle and API → Player records: loads and normalizes (evidence: `src/main/java/com/altdetector/AltDetector.java`)
- Plugin lifecycle and API → BlobCache detector: initializes detector (evidence: `src/main/java/com/altdetector/AltDetector.java`)
- Plugin lifecycle and API → Pack-cache detector: initializes detector (evidence: `src/main/java/com/altdetector/AltDetector.java`)
- Plugin lifecycle and API → Punishment queue: exposes punishment API (evidence: `README.md`)
- Alias query → Player records: reads player records (evidence: `src/main/java/com/altdetector/command/AliasCommand.java`)
- Plugin lifecycle and API → BlobCache detector: queries blob matches (evidence: `src/main/java/com/altdetector/AltDetector.java`)
- Plugin lifecycle and API → Player records: queries identifiers and claims (evidence: `src/main/java/com/altdetector/AltDetector.java`)
- Pack-cache detector → Player records: reads and records claims (evidence: `src/main/java/com/altdetector/pack/PackDetector.java`)
- Pack-cache detector → Fingerprint pack: creates packs (evidence: `src/main/java/com/altdetector/pack/PackDetector.java`)
- BlobCache detector → Player records: loads and saves IDs (evidence: `src/main/java/com/altdetector/blob/BlobDetector.java`)
- BlobCache detector → XXHash64: hashes blob data (evidence: `src/main/java/com/altdetector/blob/BlobDetector.java`)
- BlobCache detector → Blob status decoder: handles status packets (evidence: `src/main/java/com/altdetector/blob/BlobDetector.java`)
- BlobCache detector → Blob miss response: sends miss response (evidence: `src/main/java/com/altdetector/blob/BlobDetector.java`)
- Punishment queue → Plugin lifecycle and API: gets related accounts (evidence: `src/main/java/com/altdetector/punish/PunishManager.java`)
- Punishment queue → Player records: looks up display name (evidence: `src/main/java/com/altdetector/punish/PunishManager.java`)
- Punishment queue → Nukkit-MOT server: dispatches commands (evidence: `src/main/java/com/altdetector/punish/PunishManager.java`)
