About SharkAttack — Map-wide Shark Invasion Event
SharkAttack
A pack of sharks floods the waters around your players. Swimming stops being a
shortcut and the coastline stops being safe — until the event ends and every
single shark is removed.
## Features
- Spawns a configurable number of sharks, preferring water near online players
so the event happens where someone can actually see it
- Falls back to any deep water on the map, so it still fires on an empty server
- **Every spawned shark is tracked and despawned** when the event stops, when
the plugin unloads, or when the server restarts — no leftovers, ever
- Bounded spawn attempts: on a map with little water the event gives up and says
so, instead of hanging
- English and French language files included
- Hooks for other plugins
## Commands
| Command | Description | Permission |
|---|---|---|
| `/sharks` or `/sharks start` | Start the event | `sharkattack.admin` |
| `/sharks stop` | Stop it and despawn everything | `sharkattack.admin` |
| `sharks` / `sharks stop` | Same, from the server console | — |
Server admins (auth level 2) can use the commands without the permission.
## Configuration
- Shark prefab
- Number of sharks to spawn
- Spawn radius around players
- Minimum water depth required to spawn
- Chat prefix
## API
```csharp
StartSharkAttack() // start the event
StopSharkAttack() // stop it and despawn every shark
IsSharkAttackActive() // bool
```
## Hooks
```csharp
void OnSharkAttackStarted(int spawned)
void OnSharkAttackEnded(int despawned)
```