ItemChestShop
最灵活的物品交换箱子商店插件——无需经济系统!
一款现代化的 Minecraft 插件,用于创建直接以物易物的箱子商店。无需 Vault,无需货币,无需复杂设置。只需放置一个箱子和一块告示牌,即可开始交易。内置智能解析功能,支持超过 10 种不同的输入格式和 200+ 种物品别名。
✨ 主要特性
无需经济系统 - 直接以物易物,无需货币系统
超灵活解析 - 支持 10 多种不同的输入格式,极大提升便利性
200+ 物品别名 - 识别常见的缩写和替代物品名称
智能物品识别 - 理解部分名称、大小写变体和快捷方式
所有 Minecraft 物品 - 自动支持所有原版 Minecraft 物品
✅ 简单设置 - 只需放置箱子和告示牌——无需复杂配置
权限系统 - 可配置的商店访问控制
⚙️ 管理工具 - 管理命令和统计数据追踪
现代 API - 基于 Adventure API 构建,确保未来兼容性
统计数据 - 追踪销售、购买和商店表现
要求
Minecraft Server 1.21.4
Paper 服务器(兼容 Spigot,但推荐使用 Paper)
Java 17 或更高版本
无需经济插件!
无需其他依赖项!
⚙️ 安装方法
下载最新的 ItemChestShop-1.0.0-shaded.jar 文件
将 JAR 文件放入服务器的 plugins/ 文件夹中
重启服务器
插件将在 plugins/ItemChestShop/ 目录下自动生成 config.yml 配置文件
玩家可以立即开始创建商店!
无需配置——开箱即用!
快速入门指南
创建您的第一个商店:
在您想要放置商店的位置放置一个箱子
在箱子旁边或上方放置一块告示牌(距离不超过 2 格)
在告示牌上写入以下内容:
[SHOP]
YourUsername
Want: 1 Diamond
Give: 64 Bread
告示牌将自动格式化并验证
在箱子里装入面包
您的商店已准备就绪!
使用商店:
右键点击告示牌进行购买
Shift + 右键(或左键)查看商店信息
您必须拥有所需的物品才能进行交易
您无法从自己的商店购买商品
就是这样!没有复杂的设置,没有经济插件,只有简单的物品交易。
灵活的商店格式
这是该插件最强大的功能之一——它能理解 MANY 种不同的方式来书写相同的交易!
以下所有格式均适用于同一笔交易(64 个面包 ↔ 1 个钻石):
Want: 1 Diamond Want: Diamond 1 Want: 1 dia
Give: 64 Bread Give: Bread x64 Give: 64x bread
Want: 1Diamond Want: Diamond1 Want: DIAMOND
Give: Bread 64 Give: 64*Bread Give: bread x64
Want: 1 x Diamond Want: Diamond * 1 Want: dia 1
Give: 64 x Bread Give: Bread*64 Give: bread 64
支持的输入模式:
空格分隔:1 Diamond 或 Diamond 1
X 表示法:64x Bread 或 Bread x64
星号表示法:5Iron 或 Iron5
无数量:Diamond(默认为 1)
不区分大小写:diamond, DIAMOND, Diamond
灵活间距:额外空格会被忽略
多词物品:Oak Log, Iron Ingot, Cooked Beef
混合搭配:
您可以在每一行使用不同的格式:
[SHOP]
PlayerName
Want: Diamond 1
Give: 64x Bread
支持的物品
✅ 支持所有 Minecraft 物品
该插件通过智能解析识别每个原版 Minecraft 物品:
完整材质支持:
方块:Stone, Cobblestone, Oak_Log, Diamond_Block, Glass, Sand
物品:Diamond, Iron_Ingot, Stick, String, Leather, Paper
矿石:Iron_Ore, Gold_Ore, Diamond_Ore, Emerald_Ore, Coal_Ore
工具:Diamond_Sword, Iron_Pickaxe, Golden_Axe, Bow, Fishing_Rod
武器:Sword, Bow, Crossbow, Trident, Arrow
食物:Bread, Apple, Cooked_Beef, Golden_Apple, Cake
铁轨:Rail, Powered_Rail, Detector_Rail, Activator_Rail
红石元件:Redstone, Repeater, Comparator, Piston, Dispenser
智能名称识别:
该插件对物品名称的处理极其灵活:
精确名称(全部有效):
DIAMOND_SWORD(大写)
diamond_sword(小写)
Diamond Sword(空格)
Diamond_Sword(下划线)
常见别名(内置 200+ 种):
Wood → Oak_Log
Stone → Cobblestone
Iron → Iron_Ingot
Gold → Gold_Ingot
Dia → Diamond
Eme → Emerald
Cobble → Cobblestone
Pearl → Ender_Pearl
部分匹配:
Diamond 找到 Diamond
Dia 匹配 Diamond
Eme 匹配 Emerald
Rail 找到 Rail
Cart 找到 Minecart
Pick 匹配 Iron_Pickaxe
Sword 匹配 Iron_Sword
自动补全:
Iron → Iron_Ingot
Gold → Gold_Ingot
Oak → Oak_Log
Cooked → Cooked_Beef
超灵活格式
多种数量格式:
每种风格都有效:
1 Diamond(数量前有空格)
Diamond 1(数量后有空格)
64x Bread(x 在数量前)
Bread x64(x 在物品后)
5Iron_Ingot(星号在数量前)
Iron_Ingot5(星号在数量后)
32 Oak Log(多词物品)
Oak Log 32(反转顺序)
Diamond(无数量 = 1)
大小写与间距灵活性:
不区分大小写:diamond, DIAMOND, Diamond, DiAmOnD
空格变体:Oak Log, Oak_Log, OakLog, OAKLOG
忽略多余空格:1 Diamond 完全可行
下划线可选:Iron_Ingot = Iron Ingot
常见缩写有效:
Dia → Diamond
Eme → Emerald
Cobble → Cobblestone
Pick → Iron_Pickaxe
Sword → Iron_Sword
Cart → Minecart
Pearl → Ender_Pearl
Wood → Oak_Log
命令
所有基本命令均可由拥有 itemchestshop.use 权限的玩家使用(默认:所有人)。
玩家命令:
/itemchestshop help - 显示所有可用命令及用法 /itemchestshop info - 显示插件版本和信息 /itemchestshop stats - 查看您的个人商店统计 /itemchestshop list [page] - 浏览服务器上的所有商店 /itemchestshop find <item> - 搜索出售特定物品的商店
管理员命令:
/itemchestshop reload - 重新加载插件配置
命令示例:
/itemchestshop find Diamond
列出所有出售钻石的商店
/itemchestshop list 2
显示所有活跃商店的第 2 页
/itemchestshop stats
显示您的交易统计
/itemchestshop help
显示命令帮助
命令别名:
您可以使用 /ics 作为快捷方式:
/ics help
/ics find Iron
/ics stats
/ics list
权限
&]:eek:dd:bg-bg-500/10">权限说明 默认值
&]:eek:dd:bg-bg-500/10">itemchestshop.create 允许创建箱子商店 所有人
&]:eek:dd:bg-bg-500/10">itemchestshop.use 允许使用箱子商店及命令 所有人
&]:eek:dd:bg-bg-500/10">itemchestshop.admin 允许管理命令及破坏他人商店 仅 OP
设置权限:
对于 LuckPerms:
/lp group default permission set itemchestshop.create true
/lp group default permission set itemchestshop.use true
/lp group admin permission set itemchestshop.admin true
对于 PermissionsEx:
/pex group default add itemchestshop.create
/pex group default add itemchestshop.use
/pex group admin add itemchestshop.admin
商店示例
示例 1:基础食物商店
[SHOP]
PlayerName
Want: 5 Iron
Give: 64 Bread
用 5 铁锭换取 64 面包
示例 2:使用缩写
[SHOP]
Steve
Want: 1 dia
Give: 32x cobble
用 1 钻石换取 32 圆石
示例 3:混合格式
[SHOP]
Alex
Want: Emerald * 2
Give: Oak Log 128
用 2 绿宝石换取 128 橡木原木
示例 4:工具交易
[SHOP]
Miner
Want: 10 Diamond
Give: 1 Diamond_Pickaxe
用 10 钻石换取 1 钻石镐(附魔以提升价值!)
示例 5:使用别名
[SHOP]
Farmer
Want: 16 wheat
Give: 8x bread
将生小麦转换为加工后的面包
示例 6:高价值稀有物品
[SHOP]
Blacksmith
Want: 64 dia
Give: Netherite_Ingot
稀有材料的高级商店
工作原理
商店创建流程:
玩家在与箱子相邻或上方放置告示牌,格式为:[SHOP]、用户名、Want:、Give:
插件通过智能匹配解析物品名称(检查别名、部分名称、大小写变体)
插件验证数量并确保物品存在
告示牌自动格式化颜色
商店在数据库中注册并保存所有者信息
商店即可使用!
交易流程:
买家右键点击商店告示牌
插件检查买家背包中是否有所需的“Want”物品
插件检查商店箱子里是否有足够的“Give”物品库存
插件验证买家背包是否有足够空间存放物品
物品在背包之间安全交换
商店所有者收到销售通知
交易记录用于统计
安全功能:
如果任何步骤失败,交易回滚
任何更改前自动验证
修改前进行权限检查
库存验证
背包空间验证
防止物品丢失或重复
智能解析:
插件使用高级解析来理解多种格式:
首先尝试精确材质名称匹配
回退到别名查找(200+ 个别名)
检查部分名称匹配
全程不区分大小写
处理空格、下划线和特殊字符
支持数量在前或在后的格式
识别 x-notation 和星号表示法
⚙️ 配置
插件会创建一个包含可自定义选项的 config.yml 文件:
yaml
每个玩家的最大商店数量(0 = 无限制)
max_shops_per_player: 10
启用调试日志
debug: false
消息自定义
messages:
prefix: "&8[&6ItemChestShop&8]&r "
shop_created: "&a商店创建成功!"
shop_removed: "&c商店已移除!"
transaction_success: "&a交易完成!"
insufficient_stock: "&c该商店缺货!"
insufficient_funds: "&c你的物品不足!"
no_space: "&c背包空间不足!"
cannot_buy_own: "&c你不能从自己的商店购买!"
物品别名(添加自定义快捷方式)
item_aliases:
wood: oak_log
gold: gold_ingot
iron: iron_ingot
dia: diamond
eme: emerald
cobble: cobblestone
配置选项:
max_shops_per_player - 限制每个玩家的商店数量(0 = 无限制)
debug - 启用详细的控制台日志
messages - 自定义所有玩家消息
item_aliases - 添加自定义物品名称快捷方式
颜色代码:&a 绿色, &c 红色, &e 黄色, &6 金色
配置提示
限制每个玩家的商店数量:
yaml
max_shops_per_player: 5
自定义服务器消息:
yaml
messages:
prefix: "&8[&b&lMarket&8]&r "
shop_created: "&a&l✓ &a商店已开启!"
transaction_success: "&a&l✓ &a交易完成!"
添加自定义别名:
yaml
item_aliases:
log: oak_log
plank: oak_planks
pick: diamond_pickaxe
sword: diamond_sword
cart: minecart
用于故障排除的调试模式:
yaml
debug: true
将在控制台中显示详细的解析和交易日志。
故障排除
商店未创建:
验证告示牌格式:第 1 行必须是 [SHOP]
检查第 2-4 行是否包含用户名、Want: 和 Give:
确保物品名称有效(尝试使用缩写,如用 dia 代表 diamond)
确认箱子在告示牌 2 格范围内
检查玩家是否具有 itemchestshop.create 权限
物品未被识别:
尝试常见别名:dia, eme, wood, iron, gold
使用部分名称:Diamond 有效,Dia 有效,D 可能无效
检查拼写(不区分大小写)
启用调试模式以查看解析尝试
多词名称请使用下划线:Oak_Log 或 Oak Log
交易失败:
确保商店箱子里有库存物品
验证买家拥有所需的支付物品
检查买家是否有背包空间
确保箱子未满(用于接收付款)
查看控制台以获取具体错误消息
“无权限”错误:
验证是否设置了 itemchestshop.use 权限
尝试暂时给予玩家 OP 进行测试
检查权限插件是否已加载
重新加载权限:/lp reloadconfig 或类似命令
告示牌未格式化:
确保第一行正好是 [SHOP]
检查 Want: 和 Give: 后是否有冒号
尝试不同的物品名称格式
启用调试模式以查看解析错误
调试模式
启用详细日志以进行故障排除:
yaml
debug: true
调试输出显示:
告示牌创建尝试及验证
物品名称解析(尝试的名称、别名、匹配结果)
数量解析(测试的格式)
交易步骤及结果
权限检查
库存验证
背包计算
带有详细信息的错误消息
使用调试模式:
在 config.yml 中启用
运行 /itemchestshop reload
尝试创建商店
查看控制台中的详细日志
在请求支持时分享日志
高级功能
灵活的数量解析:
插件接受多种格式的数量:
64(仅数字)
x64(x-前缀)
64x(x-后缀)
64(星号前缀)
64(星号后缀)
不指定数量(默认为 1)
智能物品匹配:
物品识别优先级顺序:
精确材质名称匹配(例如,DIAMOND)
别名查找(例如,dia → DIAMOND)
部分名称匹配(例如,Diam → DIAMOND)
全程忽略大小写比较
商店发现:
/itemchestshop find Diamond
返回所有出售钻石的商店及其价格和所有者名称
统计追踪:
/itemchestshop stats
显示您的:
拥有的商店总数
总销售额
总购买额
交易最频繁的物品
️ 技术细节
构建依赖:
Paper API 1.21.4 - 核心服务器框架
Adventure API - 现代文本组件(随 Paper 捆绑提供)
Gson 2.10.1 - JSON 数据存储
Maven - 构建自动化
架构:
带子命令路由的命令系统
基于事件的商店交互(告示牌事件、库存事件)
基于 JSON 的持久化数据存储
支持事务回滚以确保安全
完整的 Bukkit 权限集成
具备多种回退策略的智能物品解析
性能:
轻量级事件处理(仅在放置/使用告示牌时激活)
高效的商店查找系统
极小的内存占用
无需数据库(使用 JSON 文件)
带缓存的快速物品名称解析
近期更新:
✅ 现代化改造至 Adventure API(无已弃用方法)
✅ 增强物品解析功能,支持 200+ 个别名
✅ 灵活的格式支持(10+ 种输入模式)
✅ 改进的错误处理和验证
✅ 为 Paper 更新做好前瞻性准备
✅ 包含所有依赖项的阴影 JAR(Shaded JAR)
支持
遇到问题?请按以下步骤操作:
检查上述故障排除部分
尝试使用物品别名:dia, eme, wood, iron
在 config.yml 中启用调试模式以获取详细日志
确认您运行的是 Java 17+ 版本的 Paper 1.21.4
检查控制台日志中的具体错误信息
首先使用 OP 权限进行测试
常见冲突:
其他箱子商店插件(卸载竞争插件)
阻止放置告示牌的保护插件(添加商店区域)
经济类插件(非必需,可能导致冲突)
ItemChestShop
The most flexible item-to-item chest shop plugin - no economy required!
A modern Minecraft plugin for creating chest shops that trade items directly for items. No Vault, no currency, no complicated setup. Just place a chest, add a sign, and start trading. Built with intelligent parsing that understands over 10 different input formats and 200+ item aliases.
✨ KEY FEATURES
No Economy Required - Trade items directly for items, no currency system needed
Ultra-Flexible Parsing - Supports 10+ different input formats for maximum convenience
200+ Item Aliases - Recognizes common abbreviations and alternative item names
Smart Item Recognition - Understands partial names, case variations, and shortcuts
All Minecraft Items - Supports every vanilla Minecraft item automatically
✅ Simple Setup - Just place a chest and sign - no complex configuration
Permission System - Configurable access control for shops
⚙️ Admin Tools - Management commands and statistics tracking
Modern API - Built with Adventure API for future compatibility
Statistics - Track sales, purchases, and shop performance
REQUIREMENTS
Minecraft Server 1.21.4
Paper server (Spigot compatible but Paper recommended)
Java 17 or higher
No economy plugin needed!
No additional dependencies required!
⚙️ INSTALLATION
Download the latest ItemChestShop-1.0.0-shaded.jar file
Place the JAR in your server's plugins/ folder
Restart your server
The plugin will automatically generate a config.yml in plugins/ItemChestShop/
Players can immediately start creating shops!
No configuration needed - it works out of the box!
QUICK START GUIDE
Creating Your First Shop:
Place a chest where you want your shop
Place a sign on or near the chest (within 2 blocks)
Write on the sign:
[SHOP]
YourUsername
Want: 1 Diamond
Give: 64 Bread
The sign will automatically format and validate
Stock your chest with bread
Your shop is ready!
Using Shops:
Right-click the sign to make a purchase
Shift + Right-click (or left-click) to view shop information
You must have the required items to trade
You cannot buy from your own shops
That's it! No complicated setup, no economy plugin, just simple item trading.
FLEXIBLE SHOP FORMATS
One of the most powerful features - the plugin understands MANY different ways to write the same trade!
All These Formats Work for the Same Trade (64 Bread ↔ 1 Diamond):
Want: 1 Diamond Want: Diamond 1 Want: 1 dia
Give: 64 Bread Give: Bread x64 Give: 64x bread
Want: 1Diamond Want: Diamond1 Want: DIAMOND
Give: Bread 64 Give: 64*Bread Give: bread x64
Want: 1 x Diamond Want: Diamond * 1 Want: dia 1
Give: 64 x Bread Give: Bread*64 Give: bread 64
Supported Input Patterns:
Space-separated: 1 Diamond or Diamond 1
X-notation: 64x Bread or Bread x64
Asterisk notation: 5Iron or Iron5
No amount: Diamond (defaults to 1)
Case insensitive: diamond, DIAMOND, Diamond
Flexible spacing: Extra spaces are ignored
Multi-word items: Oak Log, Iron Ingot, Cooked Beef
Mix and Match:
You can use different formats on each line:
[SHOP]
PlayerName
Want: Diamond 1
Give: 64x Bread
SUPPORTED ITEMS
✅ ALL Minecraft Items Supported
The plugin recognizes every vanilla Minecraft item with intelligent parsing:
Full Material Support:
Blocks: Stone, Cobblestone, Oak_Log, Diamond_Block, Glass, Sand
Items: Diamond, Iron_Ingot, Stick, String, Leather, Paper
Ores: Iron_Ore, Gold_Ore, Diamond_Ore, Emerald_Ore, Coal_Ore
Tools: Diamond_Sword, Iron_Pickaxe, Golden_Axe, Bow, Fishing_Rod
Weapons: Sword, Bow, Crossbow, Trident, Arrow
Food: Bread, Apple, Cooked_Beef, Golden_Apple, Cake
Rails: Rail, Powered_Rail, Detector_Rail, Activator_Rail
Redstone: Redstone, Repeater, Comparator, Piston, Dispenser
Smart Name Recognition:
The plugin is incredibly flexible with item names:
Exact Names (All Work):
DIAMOND_SWORD (uppercase)
diamond_sword (lowercase)
Diamond Sword (spaces)
Diamond_Sword (underscores)
Common Aliases (200+ Built-in):
Wood → Oak_Log
Stone → Cobblestone
Iron → Iron_Ingot
Gold → Gold_Ingot
Dia → Diamond
Eme → Emerald
Cobble → Cobblestone
Pearl → Ender_Pearl
Partial Matching:
Diamond finds Diamond
Dia matches Diamond
Eme matches Emerald
Rail finds Rail
Cart finds Minecart
Pick matches Iron_Pickaxe
Sword matches Iron_Sword
Auto-Completion:
Iron → Iron_Ingot
Gold → Gold_Ingot
Oak → Oak_Log
Cooked → Cooked_Beef
ULTRA-FLEXIBLE FORMATTING
Multiple Amount Formats:
Every format style works:
1 Diamond (space before)
Diamond 1 (space after)
64x Bread (x before amount)
Bread x64 (x after item)
5Iron_Ingot (asterisk before)
Iron_Ingot5 (asterisk after)
32 Oak Log (multi-word items)
Oak Log 32 (reversed)
Diamond (no amount = 1)
Case & Spacing Flexibility:
Case insensitive: diamond, DIAMOND, Diamond, DiAmOnD
Space variations: Oak Log, Oak_Log, OakLog, OAKLOG
Extra spaces ignored: 1 Diamond works fine
Underscores optional: Iron_Ingot = Iron Ingot
Common Abbreviations Work:
Dia → Diamond
Eme → Emerald
Cobble → Cobblestone
Pick → Iron_Pickaxe
Sword → Iron_Sword
Cart → Minecart
Pearl → Ender_Pearl
Wood → Oak_Log
COMMANDS
All basic commands are available to players with the itemchestshop.use permission (default: everyone).
Player Commands:
/itemchestshop help - Display all available commands and usage /itemchestshop info - Show plugin version and information /itemchestshop stats - View your personal shop statistics /itemchestshop list [page] - Browse all shops on the server /itemchestshop find <item> - Search for shops selling a specific item
Admin Commands:
/itemchestshop reload - Reload the plugin configuration
Command Examples:
/itemchestshop find Diamond
Lists all shops selling diamonds
/itemchestshop list 2
Shows page 2 of all active shops
/itemchestshop stats
Shows your trading statistics
/itemchestshop help
Displays command help
Command Aliases:
You can use /ics as a shortcut:
/ics help
/ics find Iron
/ics stats
/ics list
PERMISSIONS
&]:eek:dd:bg-bg-500/10">Permission Description Default
&]:eek:dd:bg-bg-500/10">itemchestshop.create Allow creating chest shops Everyone
&]:eek:dd:bg-bg-500/10">itemchestshop.use Allow using chest shops and commands Everyone
&]:eek:dd:bg-bg-500/10">itemchestshop.admin Allow admin commands and breaking others' shops OP only
Setting Up Permissions:
For LuckPerms:
/lp group default permission set itemchestshop.create true
/lp group default permission set itemchestshop.use true
/lp group admin permission set itemchestshop.admin true
For PermissionsEx:
/pex group default add itemchestshop.create
/pex group default add itemchestshop.use
/pex group admin add itemchestshop.admin
SHOP EXAMPLES
Example 1: Basic Food Shop
[SHOP]
PlayerName
Want: 5 Iron
Give: 64 Bread
Trade 5 Iron Ingots for 64 Bread
Example 2: Using Abbreviations
[SHOP]
Steve
Want: 1 dia
Give: 32x cobble
Trade 1 Diamond for 32 Cobblestone
Example 3: Mixed Formats
[SHOP]
Alex
Want: Emerald * 2
Give: Oak Log 128
Trade 2 Emeralds for 128 Oak Logs
Example 4: Tool Trading
[SHOP]
Miner
Want: 10 Diamond
Give: 1 Diamond_Pickaxe
Trade 10 Diamonds for 1 Diamond Pickaxe (enchant it for premium value!)
Example 5: Using Aliases
[SHOP]
Farmer
Want: 16 wheat
Give: 8x bread
Convert raw wheat to processed bread
Example 6: High-Value Rare Items
[SHOP]
Blacksmith
Want: 64 dia
Give: Netherite_Ingot
Premium shop for rare materials
HOW IT WORKS
Shop Creation Process:
Player places sign on/near chest with format: [SHOP], username, Want:, Give:
Plugin parses item names using intelligent matching (checks aliases, partial names, case variations)
Plugin validates amounts and ensures items exist
Sign is automatically formatted with colors
Shop is registered in database with owner information
Shop is ready to use!
Transaction Process:
Buyer right-clicks shop sign
Plugin checks buyer has required "Want" items in inventory
Plugin checks shop chest has "Give" items in stock
Plugin verifies buyer has inventory space for items
Items are safely exchanged between inventories
Shop owner is notified of the sale
Transaction is logged for statistics
Safety Features:
Transaction rollback if any step fails
Automatic validation before any changes
Permission checks before modifications
Stock verification
Inventory space verification
Prevents item loss or duplication
Intelligent Parsing:
The plugin uses advanced parsing to understand many formats:
Tries exact material name match first
Falls back to alias lookup (200+ aliases)
Checks partial name matches
Case-insensitive throughout
Handles spaces, underscores, and special characters
Supports amount-first or amount-last formats
Recognizes x-notation and asterisk notation
⚙️ CONFIGURATION
The plugin creates a config.yml file with customizable options:
yaml
Maximum shops per player (0 = unlimited)
max_shops_per_player: 10
Enable debug logging
debug: false
Message customization
messages:
prefix: "&8[&6ItemChestShop&8]&r "
shop_created: "&aShop created successfully!"
shop_removed: "&cShop removed!"
transaction_success: "&aTransaction complete!"
insufficient_stock: "&cThis shop is out of stock!"
insufficient_funds: "&cYou don't have enough items!"
no_space: "&cNot enough inventory space!"
cannot_buy_own: "&cYou cannot buy from your own shop!"
Item aliases (add custom shortcuts)
item_aliases:
wood: oak_log
gold: gold_ingot
iron: iron_ingot
dia: diamond
eme: emerald
cobble: cobblestone
Configuration Options:
max_shops_per_player - Limit shops per player (0 = unlimited)
debug - Enable detailed console logging
messages - Customize all player messages
item_aliases - Add custom item name shortcuts
Color codes: &a green, &c red, &e yellow, &6 gold
CONFIGURATION TIPS
Limiting Shops Per Player:
yaml
max_shops_per_player: 5
Custom Server Messages:
yaml
messages:
prefix: "&8[&b&lMarket&8]&r "
shop_created: "&a&l✓ &aShop opened!"
transaction_success: "&a&l✓ &aTrade complete!"
Adding Custom Aliases:
yaml
item_aliases:
log: oak_log
plank: oak_planks
pick: diamond_pickaxe
sword: diamond_sword
cart: minecart
Debug Mode for Troubleshooting:
yaml
debug: true
Shows detailed parsing and transaction logs in console.
TROUBLESHOOTING
Shop Not Creating:
Verify sign format: Line 1 must be [SHOP]
Check Lines 2-4 have username, Want:, and Give:
Ensure item names are valid (try abbreviations like dia for diamond)
Confirm chest is within 2 blocks of sign
Check player has itemchestshop.create permission
Items Not Recognized:
Try common aliases: dia, eme, wood, iron, gold
Use partial names: Diamond works, Dia works, D might not
Check spelling (case doesn't matter)
Enable debug mode to see parsing attempts
Use underscores for multi-word: Oak_Log or Oak Log
Transaction Failing:
Ensure shop chest has items in stock
Verify buyer has required payment items
Check buyer has inventory space
Make sure chest isn't full (for receiving payment)
Review console for specific error messages
"No Permission" Errors:
Verify itemchestshop.use permission is set
Try giving player OP temporarily to test
Check permission plugin is loaded
Reload permissions: /lp reloadconfig or similar
Signs Not Formatting:
Ensure first line is exactly [SHOP]
Check Want: and Give: have colons
Try different item name formats
Enable debug mode to see parsing errors
DEBUG MODE
Enable detailed logging for troubleshooting:
yaml
debug: true
Debug Output Shows:
Sign creation attempts and validation
Item name parsing (tried names, aliases, matches)
Amount parsing (formats tested)
Transaction steps and outcomes
Permission checks
Stock verification
Inventory calculations
Error messages with details
Using Debug Mode:
Enable in config.yml
Run /itemchestshop reload
Try creating a shop
Check console for detailed logs
Share logs when asking for support
ADVANCED FEATURES
Flexible Amount Parsing:
The plugin accepts amounts in many formats:
64 (number only)
x64 (x-prefix)
64x (x-suffix)
64 (asterisk-prefix)
64 (asterisk-suffix)
No amount (defaults to 1)
Smart Item Matching:
Priority order for item recognition:
Exact material name match (e.g., DIAMOND)
Alias lookup (e.g., dia → DIAMOND)
Partial name match (e.g., Diam → DIAMOND)
Case-insensitive comparison throughout
Shop Discovery:
/itemchestshop find Diamond
Returns all shops selling diamonds with prices and owner names
Statistics Tracking:
/itemchestshop stats
Shows your:
Total shops owned
Total sales made
Total purchases
Most traded items
️ TECHNICAL DETAILS
Built With:
Paper API 1.21.4 - Core server framework
Adventure API - Modern text components (bundled with Paper)
Gson 2.10.1 - JSON data storage
Maven - Build automation
Architecture:
Command system with subcommand routing
Event-driven shop interaction (sign events, inventory events)
JSON-based persistent data storage
Transaction rollback support for safety
Full Bukkit permission integration
Intelligent item parsing with multiple fallback strategies
Performance:
Lightweight event handling (only active when signs are placed/used)
Efficient shop lookup system
Minimal memory footprint
No database required (JSON files)
Fast item name parsing with caching
Recent Updates:
✅ Modernized to Adventure API (no deprecated methods)
✅ Enhanced item parsing with 200+ aliases
✅ Flexible format support (10+ input patterns)
✅ Improved error handling and validation
✅ Future-proof for Paper updates
✅ Shaded JAR with all dependencies included
SUPPORT
Having issues? Follow these steps:
Check the troubleshooting section above
Try using item aliases: dia, eme, wood, iron
Enable debug mode in config.yml for detailed logs
Verify you're running Paper 1.21.4 with Java 17+
Check console logs for specific error messages
Test with OP permissions first
Common Conflicts:
Other chest shop plugins (uninstall competing plugins)
Protection plugins blocking sign placement (add shop regions)
Economy plugins (not needed, can cause conflicts)
评论 0
登录后参与评分
还没有评论,来抢沙发吧