ReferenceConfiguration
packetlimitconfig.json
Per-packet rate limits for the BDS packet rate limiter.
Configures the packet rate limiter. Endstone keeps the limiter on unconditionally as a baseline defense against packet-spam and crash exploits, so this file is always read.
Each rule applies a rate-limiting algorithm to a list of Minecraft packet IDs. A defaultAlgorithm can be set as a catch-all for packet IDs not covered by an explicit group.
Sample
{
"limitGroups": [
{
"minecraftPacketIds": [193, 4],
"algorithm": {
"name": "BucketPacketLimitAlgorithm",
"params": {
"drainRatePerSec": 0.0013,
"maxBucketSize": 1
}
}
},
{
"minecraftPacketIds": [9],
"algorithm": {
"name": "BucketPacketLimitAlgorithm",
"params": {
"drainRatePerSec": 10,
"maxBucketSize": 50
}
}
}
],
"defaultAlgorithm": {
"name": "BucketPacketLimitAlgorithm",
"params": {
"drainRatePerSec": 0.0013,
"maxBucketSize": 1
}
}
}Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
limitGroups | array | Yes | List of per-packet-id limit rules. Each entry has minecraftPacketIds (array of integer packet IDs) and algorithm. |
defaultAlgorithm | object | No | Fallback algorithm applied to packet types not covered by limitGroups. Same shape as limitGroups[].algorithm. |
Algorithms
Only BucketPacketLimitAlgorithm is currently supported. It models a leaky bucket: each incoming packet adds 1 token; tokens drain at a fixed rate; packets that overflow the bucket are rejected.
| Param | Type | Range | Description |
|---|---|---|---|
drainRatePerSec | float | [0.0, 10000.0] | Tokens drained per second. Lower values mean stricter limits. |
maxBucketSize | uint32 | [1, 10000] | Bucket capacity. Larger buckets allow bigger bursts before the limiter trips. |
Server commands
| Command | Description |
|---|---|
reloadpacketlimitconfig | Reload packetlimitconfig.json and propagate the new limits to every connected client. |