Skip to content

Latest commit

 

History

History
188 lines (145 loc) · 6.33 KB

File metadata and controls

188 lines (145 loc) · 6.33 KB

Disable Villager Trade

Build codecov GitHub Release Modrinth Downloads License

Disable villager trade on your Minecraft server! Now supports multiple platforms.

🎮 Supported Platforms

Platform Minecraft Version Status
Bukkit/Spigot/Paper 1.14 - 1.21.11+ ✅ Full Support
Fabric 1.21.11 ✅ Full Support
Forge 1.21.11 ✅ Full Support
NeoForge 1.21.11 ✅ Full Support
Quilt 1.21.11 ✅ Use Fabric version

Note: Quilt is compatible with Fabric mods. Simply use the Fabric version on Quilt servers/clients.

✨ Features

  • 🚫 Prevent players from trading with villagers
  • 💬 Configurable message when trading is blocked
  • 🔓 Bypass permission for staff members
  • 🌍 Per-world/dimension exclusion configuration
  • 👨‍🌾 Villagers with no profession (unemployed) can still be interacted with
  • 🔔 Automatic update checker with notifications
  • ⚙️ Admin commands for management (all platforms)

📦 Installation

Bukkit/Spigot/Paper

  1. Download DisableVillagerTrade-Bukkit-x.x.x.jar
  2. Place the JAR file in your server's plugins folder
  3. Restart your server
  4. Configure in plugins/DisableVillagerTrade/config.yml

Fabric

  1. Download DisableVillagerTrade-Fabric-x.x.x.jar
  2. Ensure you have Fabric Loader and Fabric API installed
  3. Place the JAR file in your .minecraft/mods folder (or mods for servers)
  4. Start the game/server
  5. Configure in config/disablevillagertrade.json

Forge

  1. Download DisableVillagerTrade-Forge-x.x.x.jar
  2. Ensure you have Forge installed
  3. Place the JAR file in your .minecraft/mods folder (or mods for servers)
  4. Start the game/server
  5. Configure in config/disablevillagertrade-server.toml

NeoForge

  1. Download DisableVillagerTrade-NeoForge-x.x.x.jar
  2. Ensure you have NeoForge installed
  3. Place the JAR file in your .minecraft/mods folder (or mods for servers)
  4. Start the game/server
  5. Configure in config/disablevillagertrade-server.toml

⚙️ Configuration

Bukkit (config.yml)

# Message settings
message:
  enabled: true
  text: "&cYou can't trade with villagers on this server."

# Worlds where villager trading is ALLOWED (not blocked)
disabled-worlds:
  - example-world

# Update checker settings
update-checker:
  enabled: true
  check-interval: 24
  notify-on-join: true

Fabric (disablevillagertrade.json)

{
  "messageEnabled": true,
  "message": "§cYou can't trade with villagers on this server.",
  "disabledDimensions": [],
  "updateCheckerEnabled": true,
  "updateCheckInterval": 24,
  "notifyOnJoin": true
}

Forge/NeoForge (disablevillagertrade-server.toml)

[message]
enabled = true
text = "§cYou can't trade with villagers on this server."

[dimensions]
disabled_dimensions = []

[update_checker]
enabled = true
check_interval = 24
notify_on_join = true

🔧 Commands

All platforms support the /dvt command. Bukkit additionally registers /disabletrade and /tradetoggle as aliases.

Bukkit

Command Description Permission
/disabletrade reload Reload the plugin configuration disabletrade.admin
/disabletrade status Show plugin status and settings disabletrade.admin
/disabletrade toggle [player] Check bypass permission status disabletrade.admin
/disabletrade help Show help message disabletrade.admin

Aliases: /dvt, /tradetoggle

Fabric / Forge / NeoForge

Command Description Required Permission
/dvt reload Reload the mod configuration OP level 2 (COMMANDS_GAMEMASTER)
/dvt status Show mod status and settings OP level 2 (COMMANDS_GAMEMASTER)
/dvt help Show help message OP level 2 (COMMANDS_GAMEMASTER)

🔐 Permissions

Permission Description Default
disabletrade.admin Access to all admin commands OP
disabletrade.bypass Allows the player to bypass trade block OP
disabletrade.update Receives update notifications on join OP

Permission Support by Platform

Platform Permission System
Bukkit Native + LuckPerms, etc.
Fabric Fabric Permissions API (optional), falls back to OP level
Forge OP level 2+
NeoForge OP level 2+

📥 Downloads

Platform Link
GitHub Releases Download
Modrinth Download

🏗️ Building from Source

This is a composite multi-module Gradle project. Each platform has its own Gradle wrapper.

# Clone the repository
git clone https://github.com/dodoflix/DisableVillagerTrade.git
cd DisableVillagerTrade

# Build all platforms
cd bukkit && ./gradlew shadowJar --no-daemon && cd ..
cd fabric && ./gradlew build --no-daemon && cd ..
cd forge && ./gradlew shadowJar --no-daemon && cd ..
cd neoforge && ./gradlew build --no-daemon && cd ..

Build outputs will be in:

  • bukkit/build/libs/
  • fabric/build/libs/
  • forge/build/libs/
  • neoforge/build/libs/

🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines on:

  • Commit message conventions
  • Pull request process
  • Development setup

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.