# labaland/plugin-wallhack architecture

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

- Interactive diagram: https://gitdiagram.com/labaland/plugin-wallhack
- Repository: https://github.com/labaland/plugin-wallhack

## Overview

This Counter-Strike 2 CounterStrikeSharp plugin provides admin commands for wallhack, invisibility, money changes, and restricted RCON execution. Admins invoke commands to resolve a player or server command; the plugin updates gameplay state, while tick and transmit hooks apply invisibility and viewer-specific glow visibility. Groups show command handling, shared runtime state, and the two gameplay modules. README capabilities such as permission settings and partial-name matching are represented; unsampled details are linked only where the excerpts or README show the relationship.

Main entry points: [`src/WallhackPluginCS2Core.cs`](https://github.com/labaland/plugin-wallhack/blob/main/src/WallhackPluginCS2Core.cs) (Plugin lifecycle), [`src/Modules/Invisible.cs`](https://github.com/labaland/plugin-wallhack/blob/main/src/Modules/Invisible.cs) (Invisibility effects), [`src/Modules/Wallhack.cs`](https://github.com/labaland/plugin-wallhack/blob/main/src/Modules/Wallhack.cs) (Wallhack glow), [`src/Globals.cs`](https://github.com/labaland/plugin-wallhack/blob/main/src/Globals.cs) (Runtime state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["Admin commands"]
  node_inviscmd["Invisibility command"]
  node_moneycmd["Money command<br/>[CommandMoney.cs]"]
  node_rconcmd["RCON command<br/>[CommandRcon.cs]"]
  node_whcmd["Wallhack command<br/>[CommandWallhack.cs]"]
end

subgraph group_runtime["Plugin runtime"]
  node_core["Plugin lifecycle"]
  node_util["Player utilities<br/>[Util.cs]"]
end

subgraph group_state["Shared state"]
  node_globals["Runtime state<br/>[Globals.cs]"]
  node_sounddata["Invisibility timing<br/>[SoundData.cs]"]
  node_glowdata["Glow entities<br/>[GlowData.cs]"]
end

subgraph group_gameplay["Gameplay effects"]
  node_invisible["Invisibility effects<br/>[Invisible.cs]"]
  node_wallhack["Wallhack glow<br/>[Wallhack.cs]"]
end

node_admin(("Server admin"))
node_game(("CS2 server"))

node_admin -.->|"loads plugin"| node_core
node_core -->|"sets runtime"| node_globals
node_core -->|"ticks and dispatches"| node_invisible
node_core -->|"dispatches transmit"| node_wallhack
node_core -->|"registers commands"| node_moneycmd
node_core -->|"registers commands"| node_rconcmd
node_invisible -->|"registers commands"| node_inviscmd
node_wallhack -->|"registers commands"| node_whcmd
node_inviscmd -->|"resolves player"| node_util
node_moneycmd -->|"resolves player"| node_util
node_whcmd -->|"resolves player"| node_util
node_rconcmd -->|"executes command"| node_game
node_inviscmd -->|"updates invisibility"| node_globals
node_moneycmd -->|"sets account"| node_game
node_whcmd -->|"toggles wallhack"| node_globals
node_invisible -->|"reads and updates"| node_globals
node_invisible -->|"uses timing data"| node_sounddata
node_wallhack -->|"reads glow state"| node_globals
node_wallhack -->|"creates glow records"| node_glowdata
node_core -.->|"registers hooks"| node_game
node_invisible -->|"updates visibility"| node_game
node_wallhack -->|"controls transmit"| node_game

click node_core "https://github.com/labaland/plugin-wallhack/blob/main/src/WallhackPluginCS2Core.cs"
click node_util "https://github.com/labaland/plugin-wallhack/blob/main/src/Util.cs"
click node_globals "https://github.com/labaland/plugin-wallhack/blob/main/src/Globals.cs"
click node_sounddata "https://github.com/labaland/plugin-wallhack/blob/main/src/Models/SoundData.cs"
click node_glowdata "https://github.com/labaland/plugin-wallhack/blob/main/src/Models/GlowData.cs"
click node_inviscmd "https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandInvisible.cs"
click node_moneycmd "https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandMoney.cs"
click node_rconcmd "https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandRcon.cs"
click node_whcmd "https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandWallhack.cs"
click node_invisible "https://github.com/labaland/plugin-wallhack/blob/main/src/Modules/Invisible.cs"
click node_wallhack "https://github.com/labaland/plugin-wallhack/blob/main/src/Modules/Wallhack.cs"

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_inviscmd,node_moneycmd,node_rconcmd,node_whcmd toneBlue
class node_core,node_util toneAmber
class node_globals,node_sounddata,node_glowdata,node_admin,node_game toneMint
class node_invisible,node_wallhack toneRose
```

## Components

### Admin commands

- [Invisibility command](https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandInvisible.cs): `src/Commands/CommandInvisible.cs`
- [Money command](https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandMoney.cs): `src/Commands/CommandMoney.cs`
- [RCON command](https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandRcon.cs): `src/Commands/CommandRcon.cs`
- [Wallhack command](https://github.com/labaland/plugin-wallhack/blob/main/src/Commands/CommandWallhack.cs): `src/Commands/CommandWallhack.cs`

### Plugin runtime

- [Plugin lifecycle](https://github.com/labaland/plugin-wallhack/blob/main/src/WallhackPluginCS2Core.cs): `src/WallhackPluginCS2Core.cs`
- [Player utilities](https://github.com/labaland/plugin-wallhack/blob/main/src/Util.cs): `src/Util.cs`

### Shared state

- [Runtime state](https://github.com/labaland/plugin-wallhack/blob/main/src/Globals.cs): `src/Globals.cs`
- [Invisibility timing](https://github.com/labaland/plugin-wallhack/blob/main/src/Models/SoundData.cs): `src/Models/SoundData.cs`
- [Glow entities](https://github.com/labaland/plugin-wallhack/blob/main/src/Models/GlowData.cs): `src/Models/GlowData.cs`

### Gameplay effects

- [Invisibility effects](https://github.com/labaland/plugin-wallhack/blob/main/src/Modules/Invisible.cs): `src/Modules/Invisible.cs`
- [Wallhack glow](https://github.com/labaland/plugin-wallhack/blob/main/src/Modules/Wallhack.cs): `src/Modules/Wallhack.cs`

### Other components

- **Server admin**
- **CS2 server**

## Connections

- Server admin → Plugin lifecycle: loads plugin
- Plugin lifecycle → Runtime state: sets runtime (evidence: `src/WallhackPluginCS2Core.cs`)
- Plugin lifecycle → Invisibility effects: ticks and dispatches (evidence: `src/WallhackPluginCS2Core.cs`)
- Plugin lifecycle → Wallhack glow: dispatches transmit (evidence: `src/WallhackPluginCS2Core.cs`)
- Plugin lifecycle → Money command: registers commands (evidence: `src/WallhackPluginCS2Core.cs`)
- Plugin lifecycle → RCON command: registers commands (evidence: `src/WallhackPluginCS2Core.cs`)
- Invisibility effects → Invisibility command: registers commands (evidence: `src/Modules/Invisible.cs`)
- Wallhack glow → Wallhack command: registers commands (evidence: `src/Modules/Wallhack.cs`)
- Invisibility command → Player utilities: resolves player (evidence: `src/Commands/CommandInvisible.cs`)
- Money command → Player utilities: resolves player (evidence: `src/Commands/CommandMoney.cs`)
- Wallhack command → Player utilities: resolves player (evidence: `src/Commands/CommandWallhack.cs`)
- RCON command → CS2 server: executes command (evidence: `src/Commands/CommandRcon.cs`)
- Invisibility command → Runtime state: updates invisibility (evidence: `src/Commands/CommandInvisible.cs`)
- Money command → CS2 server: sets account (evidence: `src/Commands/CommandMoney.cs`)
- Wallhack command → Runtime state: toggles wallhack (evidence: `src/Commands/CommandWallhack.cs`)
- Invisibility effects → Runtime state: reads and updates (evidence: `src/Modules/Invisible.cs`)
- Invisibility effects → Invisibility timing: uses timing data (evidence: `src/Modules/Invisible.cs`)
- Wallhack glow → Runtime state: reads glow state (evidence: `src/Modules/Wallhack.cs`)
- Wallhack glow → Glow entities: creates glow records (evidence: `src/Modules/Wallhack.cs`)
- Plugin lifecycle → CS2 server: registers hooks
- Invisibility effects → CS2 server: updates visibility (evidence: `src/Modules/Invisible.cs`)
- Wallhack glow → CS2 server: controls transmit (evidence: `src/Modules/Wallhack.cs`)
