Reading feather.yml
Feather.config() returns a read-only FeatherConfigView of the server’s feather.yml. The values are the ones loaded at server startup, so they do not change while the server runs. Plugins cannot change them through the API.
FeatherConfigView
Section titled “FeatherConfigView”| Method | Returns |
|---|---|
antiLagMachine() | The AntiLagMachineSettings for the TNT guard. |
antiCheat() | The AntiCheatSettings for the anti-cheat check. |
sentryEnabled() | true when a Sentry DSN is set. |
AntiLagMachineSettings
Section titled “AntiLagMachineSettings”Matches the anti-lag-machine section of feather.yml.
| Method | Returns |
|---|---|
enabled() | Whether the guard is on. |
threshold() | How many primed TNT within the radius trigger the guard. |
radius() | The radius in blocks checked around a TNT that is about to explode. |
AntiCheatSettings
Section titled “AntiCheatSettings”Matches the anti-cheat.autoclicker section of feather.yml.
| Method | Returns |
|---|---|
autoClickerEnabled() | Whether the attack-rate check is on. |
autoClickerMaxCps() | The most attack clicks per second before a player is flagged. |
autoClickerAction() | The configured AntiCheatAction. |
AntiCheatAction
Section titled “AntiCheatAction”| Value | Meaning |
|---|---|
LOG | Warn the console only. No gameplay effect. |
CANCEL | Ignore the offending action. |
KICK | Disconnect the player. |
Example
Section titled “Example”if (Feather.isAvailable()) { var guard = Feather.config().antiLagMachine(); getLogger().info("TNT guard " + (guard.enabled() ? "on" : "off") + ", threshold " + guard.threshold() + ", radius " + guard.radius());}Adapted from the PaperMC docs (CC BY-SA 4.0). About these docs.