Configuration Guide
The plugin creates a config.yml file at plugins/NoFarmlandTrample/config.yml on first startup.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Main Settings
language: en
Sets the plugin language. Use "en" for English or "ru" for Russian. You can also create your own language files.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Protection Settings
protection.enabled: true
Master switch. Set to false to disable all protection.
protection.prevent-players: true
Prevents players from trampling farmland.
protection.prevent-mobs: true
Prevents mobs (zombies, villagers, etc.) from trampling farmland.
protection.prevent-all-entities: true
Prevents all entities (items, falling blocks, etc.) from trampling farmland.
protection.bypass-with-permission: true
If true, players with permission "nofarmtrample.bypass" can trample.
protection.warn-only-mode: false
If true, players will only be warned but can still trample.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Notification Settings
notifications.notify-player: true
Send a chat message to players when they try to trample.
notifications.use-actionbar: false
Use the ActionBar instead of chat. Note: This uses NMS reflection built for 1.8 and may not work on other versions.
notifications.message-cooldown-ms: 3000
Cooldown between messages in milliseconds. Default is 3 seconds.
notifications.log-to-console: false
Log every trampling attempt to the console.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Sound Settings
notifications.sound.enabled: true
Play a sound when trampling is prevented.
notifications.sound.name: NOTE_BASS
The sound to play. Default is NOTE_BASS (works on 1.8).
notifications.sound.volume: 1.0
Volume from 0.0 to 1.0.
notifications.sound.pitch: 0.5
Pitch from 0.5 to 2.0.
Sound names that work on Minecraft 1.8:
- NOTE_BASS
- NOTE_PLING
- NOTE_PIANO
- VILLAGER_NO
- ANVIL_LAND
- ORB_PICKUP
- ITEM_BREAK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crop Protection (Optional Feature)
crop-protection.enabled: false
If true, prevents players from breaking crops that are not fully grown.
crop-protection.protect-nether-wart: false
Also protect nether wart from being broken when not fully grown.
crop-protection.protect-beetroot: false
Also protect beetroot from being broken when not fully grown.
Note: Fully grown crops can still be harvested normally.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Per-World Settings
per-world.enabled: false
If false, protection works in all worlds. If true, uses the worlds list below.
per-world.mode: whitelist
Two modes available:
- "whitelist" - Only protect worlds listed below
- "blacklist" - Protect all worlds EXCEPT those listed below
per-world.worlds:
- world
- world_nether
- world_the_end
List of world names to use with whitelist/blacklist mode.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Ignored Players
ignored-players:
- PlayerName1
- PlayerName2
List of player names who can always trample farmland (works without giving them permissions).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Statistics
statistics.enabled: true
Track how many trampling attempts were prevented.
statistics.top-players-limit: 10
Maximum number of players shown in /nft top command.
Statistics are saved to plugins/NoFarmlandTrample/stats.yml every 5 minutes and when the server stops.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Creating Custom Languages
1. Navigate to plugins/NoFarmlandTrample/lang/
2. Copy the file en.yml and rename it (for example: de.yml for German)
3. Open the new file with any text editor
4. Translate all messages on the right side of the colons
5. Save the file
6. Open config.yml and change "language: en" to "language: de"
7. Run /nft reload in-game or restart the server
Color codes use the & symbol. For example: &c for red, &a for green, &6 for gold.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Troubleshooting
Problem: Plugin doesn't load
Solution: Make sure you are using a Spigot or Paper server based on Bukkit 1.8 API.
Problem: Sound doesn't play
Solution: Make sure you're using a sound name that exists in your server version. The default NOTE_BASS works on 1.8.
Problem: Messages appear with strange characters
Solution: Make sure your language file is saved with UTF-8 encoding.
Problem: ActionBar doesn't work
Solution: ActionBar uses NMS code built for 1.8. If you're on a different version, set notifications.use-actionbar to false to use chat messages instead.
Problem: Mobs still trample farmland
Solution: Make sure protection.prevent-mobs is set to true and run /nft reload.
Problem: How do I give bypass permission?
Solution: Use any permission plugin (like LuckPerms, PermissionsEx) and give the player the permission "nofarmtrample.bypass".
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Example Configurations
Example 1: Only protect main survival world
per-world:
enabled: true
mode: whitelist
worlds:
- survival
Example 2: Protect everything except creative
per-world:
enabled: true
mode: blacklist
worlds:
- creative
Example 3: Strict mode with logging
protection:
enabled: true
prevent-players: true
prevent-mobs: true
bypass-with-permission: false
notifications:
notify-player: true
log-to-console: true