# x7khalid/vip1b architecture

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

- Interactive diagram: https://gitdiagram.com/x7khalid/vip1b
- Repository: https://github.com/x7khalid/vip1b

## Overview

VIP1b is a PocketMine plugin for configuring a protected VIP area and restricting entry to players with `vip1b.area.vip`. Operators set two corner positions with `/vip1b pos1` and `/vip1b pos2`; player movement triggers the area check and unauthorized players are sent to the default spawn. The runtime behavior is implemented in one PHP file, so its distinct responsibilities share that path. The README documents the command, while the source excerpt shows configuration and movement handling; no separate integration or storage implementation is shown.

Main entry points: [`src/iBa4x/VIP/Main.php`](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php) (Movement handler), [`Resource/Config.yml`](https://github.com/x7khalid/vip1b/blob/master/Resource/Config.yml) (Area coordinates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Area configuration"]
  node_command["VIP command<br/>[Main.php]"]
  node_area_config[("Area coordinates<br/>[Config.yml]")]
end

subgraph group_access["Access control"]
  node_movement["Movement handler<br/>[Main.php]"]
  node_boundary["Boundary check<br/>[Main.php]"]
  node_permission["VIP permission check<br/>[Main.php]"]
  node_denial["Teleport and denial<br/>[Main.php]"]
end

subgraph group_lifecycle["Plugin lifecycle"]
  node_registration["Event registration<br/>[Main.php]"]
end

node_operator(("Operator"))
node_player(("Player"))
node_pocketmine["PocketMine runtime"]

node_operator -->|"runs command"| node_command
node_command -->|"saves corners"| node_area_config
node_command -->|"reports permission"| node_operator
node_pocketmine -->|"enables plugin"| node_registration
node_registration -->|"registers listener"| node_pocketmine
node_pocketmine -.->|"dispatches movement"| node_movement
node_movement -->|"reads corners"| node_area_config
node_movement -->|"checks bounds"| node_boundary
node_boundary -->|"returns containment"| node_movement
node_movement -->|"checks permission"| node_permission
node_movement -->|"denies entry"| node_denial
node_denial -->|"teleports and messages"| node_player

click node_command "https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php"
click node_area_config "https://github.com/x7khalid/vip1b/blob/master/Resource/Config.yml"
click node_movement "https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php"
click node_boundary "https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php"
click node_permission "https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php"
click node_denial "https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php"
click node_registration "https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php"

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_command,node_area_config toneBlue
class node_movement,node_boundary,node_permission,node_denial toneAmber
class node_registration toneMint
class node_operator,node_player,node_pocketmine toneIndigo
```

## Components

### Area configuration

- [VIP command](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php): `src/iBa4x/VIP/Main.php`
- [Area coordinates](https://github.com/x7khalid/vip1b/blob/master/Resource/Config.yml): `Resource/Config.yml`

### Access control

- [Movement handler](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php): `src/iBa4x/VIP/Main.php`
- [Boundary check](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php): `src/iBa4x/VIP/Main.php`
- [VIP permission check](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php): `src/iBa4x/VIP/Main.php`
- [Teleport and denial](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php): `src/iBa4x/VIP/Main.php`

### Plugin lifecycle

- [Event registration](https://github.com/x7khalid/vip1b/blob/master/src/iBa4x/VIP/Main.php): `src/iBa4x/VIP/Main.php`

### Other components

- **Operator**
- **Player**
- **PocketMine runtime**

## Connections

- Operator → VIP command: runs command (evidence: `README.md`)
- VIP command → Area coordinates: saves corners (evidence: `src/iBa4x/VIP/Main.php`)
- VIP command → Operator: reports permission (evidence: `src/iBa4x/VIP/Main.php`)
- PocketMine runtime → Event registration: enables plugin (evidence: `src/iBa4x/VIP/Main.php`)
- Event registration → PocketMine runtime: registers listener (evidence: `src/iBa4x/VIP/Main.php`)
- PocketMine runtime → Movement handler: dispatches movement
- Movement handler → Area coordinates: reads corners (evidence: `src/iBa4x/VIP/Main.php`)
- Movement handler → Boundary check: checks bounds (evidence: `src/iBa4x/VIP/Main.php`)
- Boundary check → Movement handler: returns containment (evidence: `src/iBa4x/VIP/Main.php`)
- Movement handler → VIP permission check: checks permission (evidence: `src/iBa4x/VIP/Main.php`)
- Movement handler → Teleport and denial: denies entry (evidence: `src/iBa4x/VIP/Main.php`)
- Teleport and denial → Player: teleports and messages (evidence: `src/iBa4x/VIP/Main.php`)
