qShadowTrader 图标

qShadowTrader

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/qshadowtrader
资源信息

Minecraft 版本: 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4

平台: paper spigot

标签: adventure economy game-mechanics

资源介绍

Support me on Ko-fi

qShadowTrader


Main Features

  • Random trader spawn near a valid player.
  • Configurable spawn intervals, chance, and distance.
  • Spawn restrictions by world (blocked-worlds) and optional allow-list (allowed-worlds).
  • Configurable offers in trades.yml:
    • regular items (material, amount),
    • custom items (item.*: name/lore/model-data/enchantments/flags/unbreakable).
  • Global purchase limits per offer (limit) displayed in lore.
  • Command execution on purchase ([console] / [player]).
  • Double-click purchase protection.
  • Chat notifications for trader spawn/despawn.
  • Player cooldown persistence in data.yml.

Trader Lifecycle

  1. The plugin waits a random interval between spawn.interval-min and spawn.interval-max.
  2. On each cycle, it rolls spawn.chance.
  3. A random valid player is selected:
    • online and alive,
    • not in creative/spectator,
    • world is not in spawn.blocked-worlds,
    • if allowed-worlds is set, world must be in that list,
    • player-cooldown must be satisfied.
  4. Trader spawns at a safe location near that player (spawn-distance).
  5. Offers are generated from trades.yml using weighted chance values.
  6. Trader despawns after lifetime or when all active offers are bought out (if despawn-when-empty: true).

Commands

  • /shadowtrader spawn — spawn near self (if executed by player) or random valid target (from console).
  • /shadowtrader spawn random — force random spawn using valid target rules.
  • /shadowtrader spawn <player> — spawn near a specific player (with all validations).
  • /shadowtrader despawn — remove current active trader.
  • /shadowtrader reload — reload plugin configs.
  • /shadowtrader info — show trader status.
  • Alias: /st

Permissions

  • qshadowtrader.use
  • qshadowtrader.admin
  • qshadowtrader.spawn
  • qshadowtrader.reload

Configuration (config.yml)

Key sections:

  • spawn — auto-spawn logic (intervals, chance, worlds).
  • player-cooldown — cooldown before same player can be selected again.
  • spawn-distance — min/max distance from target player.
  • messages — chat messages.
  • lifetime — trader lifetime in seconds.
  • despawn-when-empty — despawn when all offers are exhausted.
  • trader — entity behavior/options.
  • menu — GUI settings.
  • protection.double-click-window-ms — anti-double-click window.

Offers (trades.yml)

Each offer is defined under items.<id> and supports:

  • material / amount (short format), or
  • item.* (advanced custom item format),
  • limit — max purchases for the current trader session,
  • chance — generation weight,
  • lore — offer description shown in GUI,
  • commands — commands to run on purchase.

Offer Lore Placeholders

  • %CURR_LIMIT% — current purchased amount
  • %MAX_LIMIT% — max limit for this offer

Command Prefixes

  • [console] command — execute as console
  • [player] command — execute as player
  • no prefix — executes as console

Supported placeholders in commands: <player>, %player%


Offer Example

totem:
  material: TOTEM_OF_UNDYING
  amount: 1
  limit: 1
  chance: 10
  lore:
    - ""
    - "&7Price: &62500"
    - "&7Limit: %CURR_LIMIT%/%MAX_LIMIT%"
    - ""
  commands:
    - "[console] eco remove <player> 2500"

Notes

  • Trader is protected from damage/combustion.
  • Offer limits reset on each new trader spawn.
  • If auto-spawn does not work, check spawn.enabled, world filters (allowed/blocked), and whether there are valid online players.
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
JustAnnouncements

价格:0 墨喵币
下载量:0

查看详情
Create: Wizardry

价格:0 墨喵币
下载量:0

查看详情
No Guardian ❌

价格:0 墨喵币
下载量:0

查看详情
HomeMod

价格:0 墨喵币
下载量:0

查看详情