customtrades
PluginMIT

customtrades

plugin for trades with villagers and custom items from nexo also you can use playerpoints as economy.

395
Downloads
2
Followers
5 months ago
Updated
📦
1
Versions

📖About customtrades

CustomTrades

A comprehensive Paper/Folia 1.21.x plugin for custom trader NPCs with Nexo and PlayerPoints support.

Features

  • ✅ Create custom trader NPCs (Villager, Wandering Trader, Zombie Villager)
  • ✅ User-friendly GUI for trade management
  • ✅ Support for vanilla items and Nexo custom items
  • ✅ PlayerPoints as alternative currency
  • ✅ Folia compatible
  • ✅ YAML-based configuration per trader
  • ✅ Persistent traders (survive server restarts)

Commands

  • /ct create - Creates a new trader at your position
  • /ct edit - Opens the trade editor for the targeted trader
  • /ct remove - Removes a trader
  • /ct list - Lists all traders
  • /ct reload - Reloads all traders

Permissions

  • customtrades.use - Access to all commands (default: op)
  • customtrades.create - Create traders (default: op)
  • customtrades.edit - Edit traders (default: op)
  • customtrades.remove - Remove traders (default: op)
  • customtrades.list - List traders (default: op)

Setup

1. Dependencies

The plugin requires the following dependencies:

  • Paper/Folia 1.21.x
  • PlayerPoints 3.2.7+ (optional, for PlayerPoints trades)
  • Nexo 0.1.0+ (optional, for custom items)

2. Installation

  1. Place the plugin in the plugins folder
  2. Start the server
  3. (Optional) Install PlayerPoints and/or Nexo
  4. Use /ct create to create your first trader

Usage

Creating a trader

/ct create MyTrader villager

Spawns a villager trader at your position.

Configuring trades

  1. Look at the trader
  2. Execute /ct edit
  3. Click on "Add Trade"
  4. Place items from your inventory into the slots or use the options
  5. Set PlayerPoints cost (optional)
  6. Save the trade

YAML Configuration

Each trader is saved in plugins/customtraders/traders/<name>.yml:

name: MyTrader
mobType: VILLAGER
displayName: "&6Trader"
persistent: true
location:
world: world
x: 100.5
y: 64.0
z: 200.5
yaw: 0.0
pitch: 0.0

trades:
0:
input1:
type: VANILLA
material: DIAMOND
amount: 10
output:
type: VANILLA
material: EMERALD
amount: 1
maxUses: -1
playerPointsCost: 0

1:
input1:
type: NONE # No item - PlayerPoints only
output:
type: NEXO
nexoId: custom_sword
amount: 1
maxUses: 1
playerPointsCost: 1000

Item Types

  • VANILLA: Normal Minecraft items
    type: VANILLA
    material: DIAMOND_SWORD
    amount: 1
    displayName: "&bSpecial Sword"
    lore:

    • "&7A special sword"
  • NEXO: Custom items from Nexo
    type: NEXO
    nexoId: my_custom_item
    amount: 1

  • NONE: No item (for PlayerPoints-only trades)
    type: NONE

PlayerPoints Integration

When PlayerPoints is installed:

  • Set playerPointsCost to a value > 0
  • The player needs the specified points for the trade
  • Points are automatically deducted on successful trade
  • You can set input1 to type: NONE for pure PlayerPoints trades

Folia Compatibility

The plugin uses:

  • Entity Scheduler for entity-related tasks
  • Region Scheduler for region-related tasks
  • Automatic detection of Folia vs. Paper

License

MIT License