Skip to content

PShop是一个商店插件,服主可以在商店中添加固定的售卖物品和回收物品,支持addon物品,带有玩家市场等

前置组件

必选

LL3

可选

安装

LL3

  • 将文件夹PShop解压到此路径下:BDS/plugins/
  • 更新插件请在保存必要配置文件删除源PShop插件目录并重新解压

注册指令说明

/shop

/shop (gui) - 打开总GUI
/shop buy - 打开购买物品GUI
/shop sell - 打开出售物品GUI

/market

/market buy_sell - 打开购买/出售物品GUI
/market buy_sell_list - 打开购买/出售物品(列表)GUI
/market buy_sell_search_normal - 打开购买/出售物品(简易搜索)GUI
/market buy_sell_search_better - 打开购买/出售物品(高级搜索)GUI
/market ctrl - 打开全球市场控制台GUI
/market add - 打开上架物品GUI
/market edit - 打开编辑物品GUI
/market del - 打开删除物品GUI
/market gui - 打开全球市场GUI
/market reload - 重新加载配置文件

/pshop

/pshop reload - 重新加载配置文件
/pshop version - 查询版本信息

配置文件说明

更改配置文件请注意 JSON 文件格式,不推荐使用记事本修改配置文件!

config.json文件

js
{
    "money": {//经济系统
        "type": "llmoney",//经济系统框架,可选llmoney 或者 score
        "name": "money",//经济名称
        "score": "money"//经济计分板
    },
    "commands": {
        "shop": "shop",//商店系统指令
        "market": "market"//全球市场指令
    },
    "vip": {
        "enable": false,//是否启用vip打折
        "discount": 0.8//vip折扣
    },
    "info": {
        "shop": "§l§b[商店] §r",//商店系统前缀
        "market": "§l§b[市场] §r"//全球市场前缀
    },
    "enable": {
        "shop": true,//是否启用商店
        "market": true,//是否启用全球市场
        "log": true//是否启用log
    },
    "nbt": {
        "MatchBucketEntityCustomName": false,//是否匹配实体的自定义名称,建议关闭
        "MatchBucketEntityFallDistance": false,//是否匹配实体的落下距离,建议关闭
        "MatchBucketEntityFire": true,//是否匹配实体的燃烧,建议开启
        "MatchBucketEntityStrength": true,//是否匹配实体的强度(骆驼等),建议开启
        "MatchBucketEntitySheared": true,//是否匹配是否剪毛(?),建议保持开启
        "MatchRepairCost": false//是否匹配修理的花费,建议保持关闭
    },
    "minPayment": 1,//最低支付金额
    "enablelang": [
        "zh_CN"
    ],//启用的语言,建议保持默认
    "defaultlang": "zh_CN",//在未知时显示的语言,建议保持默认
    "lang": "zh_CN",//语言,匹配bds\resource_packs\vanilla\texts\下的xxx.lang文件名
    "banitems": [
        "minecraft:bedrock"
    ],//不允许上架的商品id列表,可填多个,如["minecraft:bedrock","minecraft:dirt"]
    "update_url": "https://gitee.com/SCFY233/PShop/raw/main/update/version.json",//更新链接,建议保持默认
    "logo": {
        "gui.cancel": "",
        "gui.back": "",
        "gui.confirm": "",
        "shop.buy": "",
        "shop.sell": "",
        "gui.lastpage": "",
        "gui.nextpage": "",
        "market.add.byitemtype": "",
        "market.add.byhaveitem": "",
        "market.buy_sell": "",
        "market.buy_sell.list": "",
        "market.buy_sell.search.normal": "",
        "market.buy_sell.search.better": "",
        "market.buy_sell_item.buy": "",
        "market.buy_sell_item.sell": "",
        "market.add.byhand": "",
        "market.ctrl": "",
        "market.add": "",
        "market.ctrl.edit": "",
        "market.ctrl.del": "",
        "market.add.byhand.mainhand": "",
        "market.add.byhand.offhand": "",
        "market.edit.button.self": "",
        "market.edit.button.all": ""
    },//按钮的前缀logo,留空不显示
    /*如果使用材质包路径,图片路径应该形如 textures/items/apple
    如果使用URL路径,那么在这里放入完整的URL即可,形如 https://www.baidu.com/img/flexible/logo/pc/result.png
    如果这个按钮你不需要显示图片,那填写""即可*/
    "itemsperpage": 10//GUI每页显示商品数量
}

lang.json文件

js
{
    "money.error": "经济系统配置错误!",
    "money.error.pl": "经济系统配置错误!请上报服务器管理员!",
    "gui.exit": "表单已关闭!",
    "shop.buy.ok": "购买成功!",
    "shop.mustnum": "数量必须是整数而且不能是负数",
    "shop.sell.ok": "出售成功!",
    "import.error.PVip": "依赖 PVip 未安装,vip打折无法使用!",
    "import.error.PLib": "依赖 PLib 未安装,插件无法正常运行!插件将在3s后自动卸载!",
    "import.error.FinalTextures": "依赖 FinalTextures 未安装,插件无法正常运行!插件将在3s后自动卸载!",
    "lang.restore.success": "语言文件恢复完成!请重启服务器!!!,服务器将在10s后自动关闭!",
    "config.update.success": "检测到旧版配置文件,已经自动更新!",
    "gives.update.success.money": "检测到旧版给予(money)文件,已经自动更新!",
    "gives.update.success.item": "检测到旧版给予(item)文件,已经自动更新!",
    "shop.buy.tip": "购买物品{item.name}\n物品标准类型名:{item.id}\n物品数据值(Aux):{item.aux}\n价格:{money}/个,(原价{original_money}/个)",
    "shop.buy.title": "{info}购买物品:{item.name}",
    "log.shop.buy": "购买物品:{item.name} 物品id:{item.id} 数量:{quantity} 价格:{totalCost}",
    "log.shop.sell": "出售物品:{item.name} 物品id:{item.id} 数量:{quantity} 价格:{totalCost}",
    "log.market.buy": "购买商品:{item.name} 上架玩家:{item.player} 上架时间:{item.time} 数量:{count} 价格:{totalCost}",
    "log.market.sell": "出售商品:{item.name} 上架玩家:{item.player} 上架时间:{item.time} 数量:{count} 价格:{totalCost}",
    "log.market.add": "添加商品:{item.name} 数量:{count} 价格:{totalCost}",
    "log.market.edit": "编辑商品:{item.name}",
    "log.market.del": "删除商品:{item.name}",
    "log.update.error": "无法访问更新站点!!!",
    "gui.cancel": "取消",
    "gui.back": "返回",
    "gui.confirm": "确定",
    "command.ori.typeerror": "请不要在命令方块或控制台使用商店的命令",
    "command.shop.desc": "商店",
    "command.market.desc": "全球市场",
    "command.pshop.desc": "PShop插件主命令",
    "command.pshop.reload.success": "配置重载成功!",
    "command.pshop.version": "当前版本: {version}{fix} \n作者:{author}",
    "shop.input.buycount": "购买数量",
    "shop.sell.title": "{info}出售物品:{item.name}",
    "shop.sell.tip": "出售物品{data.name}\n物品标准类型名:{itemdata.id}\n价格:{itemdata.money}/个",
    "shop.input.sellcount": "出售数量,你当前拥有{itemCount}个,输入all出售全部",
    "shop.buy.maintitle": "{info}购买商品",
    "shop.sell.maintitle": "{info}出售商品",
    "shop.buy.group": "{info}{name}",
    "shop.sell.group": "{info}{name}",
    "shop.itembuttonname": "{item.name} {item.money}{money.name}/个",
    "shop.groupbuttonname": "{item.name}",
    "shop.buy.no": "{info}你没有那么多钱,你只有:{pl.money}",
    "shop.sell.no": "{info}你没有那么多物品,你只有:{count}",
    "gui.button.lastpage": "上一页",
    "gui.button.nextpage": "下一页",
    "gui.group.content": "第 {page} 页,共 {totalPages} 页",
    "market.title": "主菜单",
    "market.button.buy_sell": "购买/出售商品",
    "market.buy_sell.maintitle": "{info}购买/出售商品",
    "market.buy_sell.list.title": "{info}商品列表",
    "market.buy_sell.button.list": "以列表显示",
    "market.buy_sell.button.search.normal": "简易搜索",
    "market.buy_sell.button.search.better": "高级搜索",
    "market.group.item": "{item.name} {item.count}个/{item.money}{money.name}",
    "market.buy_sell_item.title": "{info2}{item.name}",
    "market.buy_sell_item.content": "商品数据如下: \n物品名称:{item.name}\n物品自定义名称{item.customname}\n物品标准类型名:{itemdata.type}\n物品数量:{itemdata.count}\n物品数据值:{itemdata.aux} \n总价格:{item.money}{money.name}\n平均价格:{avgmoney}{money.name}/个\n上架时间{item.time}\n上架玩家:{item.player}",
    "market.buy_sell_item.item.content": " 物品名称:{item.name}\n 物品自定义名称{item.customname}\n 物品标准类型名:{itemdata.type}\n 物品数量:{itemdata.count}\n 物品数据值:{itemdata.aux}",
    "market.buy_sell_item.content.no_customname": "无",
    "market.buy_sell_item.content.enchants": "附魔:{enchants}",
    "market.buy_sell_item.content.potion": "药水效果:{potion.effect}\n持续时间:{potion.duration}",
    "market.buy_sell_item.content.includeitems": "包含物品:{items}",
    "market.buy_sell_item.slider.count": "选择数量",
    "market.buy_sell_item.buy.cantbypartial": "该物品不允许部分购买",
    "market.buy_sell_item.sell.cantbypartial": "该物品不允许部分出售",
    "market.buy_sell_item.noitem": "你没有足够的该物品",
    "market.buy_sell_item.sell.count": "出售数量:{havecount}/{count}",
    "market.buy_sell_item.sell.slider.count": "出售数量",
    "market.buy_sell_item.sell.confirm": "你确定要出售吗,你将获得{totalCost}{money.name}",
    "market.buy_sell_item.buy.count": "购买数量:{count}",
    "market.buy_sell_item.buy.nomoney": "你没有那么多钱!,需要花费:{totalCost}{money.name},你只有:{pl.money}{money.name}",
    "market.buy_sell_item.buy.confirm": "你确定要购买吗,你将花费{totalCost}{money.name}",
    "market.buy_sell_item.button.buy": "购买",
    "market.buy_sell_item.button.sell": "出售",
    "market.buy_sell_item.sell.success": "出售成功",
    "market.buy_sell_item.buy.success": "购买成功",
    "market.buy_sell_item.no": "商品不存在,可能已经被售空!",
    "item.try.reduce.fail": "扣除物品失败!",
    "market.search.normal.maintitle": "{info}简易搜索",
    "market.search.normal.noitem": "没有找到任何商品!",
    "market.search.normal.title": "{info}搜索: {keyword}",
    "market.buy_sell_item.player.sell.success": "你成功收购了{item.name},你获得了玩家出售给你的物品",
    "market.buy_sell_item.player.buy.success": "你成功出售了{item.name},你获得了{totalCost}{money.name}",
    "market.search.better.maintitle": "{info}高级搜索",
    "market.search.betterinput": "请输入搜索关键词",
    "market.search.bettersearch.dropdown": "选择搜索方式",
    "market.search.bettersearch.dropdown.name": "按名称",
    "market.search.bettersearch.dropdown.type": "按物品标准类型名",
    "market.search.bettersearch.dropdown.player": "按玩家名称",
    "market.search.bettersort.dropdown": "选择排序方式",
    "market.search.bettersort.dropdown.nosort": "不排序",
    "market.search.bettersort.dropdown.up": "正序",
    "market.search.bettersort.dropdown.down": "降序",
    "market.search.bettersort.dropdown.money.up": "价格正序",
    "market.search.bettersort.dropdown.money.down": "价格降序",
    "market.search.betterbypartial.dropdown": "允许部分购买?",
    "market.search.betterbypartial.dropdown.all": "全部",
    "market.search.betterbypartial.dropdown.yes": "是",
    "market.search.betterbypartial.dropdown.no": "否",
    "market.search.better.noitem": "没有找到任何商品!",
    "market.search.better.title": "{info}搜索: {keyword}",
    "market.button.ctrl": "管理商品",
    "market.edit.input.money": "商品价格",
    "market.ctrl.maintitle": "{info}管理商品",
    "market.ctrl.button.add": "上架商品",
    "market.add.notenough.money": "你没有足够的钱,需要花费:{totalCost}{money.name},你只有:{pl.money}{money.name}",
    "market.add.maintitle": "{info}上架商品",
    "market.add.button.byitemtype": "根据标准类型名上架",
    "market.add.button.byhaveitem": "根据拥有物品上架",
    "market.add.button.byhand": "上架手中物品",
    "market.add.byitemtype.title": "{info}上架商品-标准类型名方式",
    "market.add.byitemtype.input.type": "物品标准类型名",
    "market.add.byitemtype.input.aux": "物品数据值(Aux)",
    "market.add.byitemtype.input.count": "物品数量",
    "market.add.byitemtype.switch.bypartial.sell": "允许部分出售,即玩家可以只出售部分物品,而不是全部",
    "market.add.byitemtype.input.money": "商品价格",
    "market.add.byitemtype.input.type.error": "物品标准类型名格式错误,请检查!",
    "market.add.byitemtype.input.aux.error": "物品数据值(Aux)必须为整数!",
    "market.add.byitemtype.input.count.error": "物品数量必须为正整数!",
    "market.add.byitemtype.input.money.error": "商品价格必须为数量的正整数倍!",
    "market.add.byhaveitem.title": "{info}上架商品-拥有物品方式",
    "market.add.byhaveitem.dropdown.item": "选择物品",
    "market.add.byhaveitem.switch.mode": "选择上架方式,关闭求购,打开出售",
    "market.add.byhaveitem.switch.bypartial": "是否允许部分购买/出售,即玩家可以只购买/出售部分物品,而不是全部",
    "market.add.byhaveitem.slider.count": "选择数量",
    "market.add.byhaveitem.input.money": "输入价格",
    "market.add.byhand.title": "{info}上架手中物品",
    "market.add.byhand.mainhand": "主手",
    "market.add.byhand.offhand": "副手",
    "market.add.byhand.empty": "手中为空,请先手持物品!",
    "market.add.byhand.switch.mode": "选择上架方式,关闭求购,打开出售",
    "market.add.byhand.switch.bypartial": "是否允许部分购买/出售,即玩家可以只购买/出售部分物品,而不是全部",
    "market.add.byhand.slider.count": "选择数量",
    "market.add.byhand.input.money": "输入价格",
    "market.add.item.prefix.buy": "[收购]",
    "market.add.item.prefix.sell": "[出售]",
    "market.ctrl.button.edit": "编辑商品",
    "market.ctrl.button.del": "下架商品",
    "market.add.success": "上架成功!",
    "market.add.byitemtype.confirm.title": "{info}上架商品确认",
    "market.add.byitemtype.confirm.desc": "你确定要使用标准类型名上架吗?标准类型名无法匹配附魔,内含有物品的物品!并且只能求购商品!",
    "market.edit.title": "{info}编辑商品",
    "market.edit.button.self": "编辑自己的商品",
    "market.edit.button.all": "编辑所有商品",
    "market.edit.noitem": "没有商品!",
    "market.edit.switch.mode": "选择商品类型,关闭求购,打开出售",
    "market.edit.switch.bypartial": "是否允许部分购买/出售,即玩家可以只购买/出售部分物品,而不是全部",
    "market.edit.switch.delete": "删除此商品",
    "market.edit.error.type": "你不能将收购商品转换为出售商品!",
    "market.edit.notenough.money": "你的钱不够!需要{totalCost}{money.name},你只有{pl.money}{money.name}",
    "market.edit.success": "编辑成功!",
    "market.del.confirm": "你确定要删除吗,此操作不可撤销!",
    "market.del.success": "删除成功!",
    "market.baneditem": "该物品不允许上架!",
    "network.update.newversion": "{name}检测到新版本!版本号:{version}",
    "network.update.notice": "更新公告:{notice}",
    "network.update.download": "下载地址:{url}",
    "market.add.input.count.error": "物品数量必须为正整数!",
    "market.add.input.money.error": "",
    "market.buy_sell.search.normal.input": "搜索名称(可带[求购]/[出售]前缀)"
}

shopdata.json文件

js
{
    "Buy": [//购买配置
        {
            "name": "示例",//名字
            "type": "group",//类别,仅有item和group可选
            "image": "",//图片,详见:和config的logo一样
            "data": [//数据,item模式使用[{数据}],group使用[{数据},{数据}]
                {
                    "name": "示例(苹果)",
                    "type": "item",
                    "image": "",
                    "data": [
                        {
                            "id": "minecraft:apple",//物品id,要有命名空间前缀
                            "aux": 0,//数据值
                            "money": 10//单个的价格
                        }
                    ]
                }
            ]
        }
    ],
    "Sell": [//出售配置,同Buy
        {
            "name": "示例",
            "type": "group",
            "image": "",
            "data": [
                {
                    "name": "示例(苹果)",
                    "type": "item",
                    "image": "",
                    "data": [
                        {
                            "id": "minecraft:apple",
                            "aux": 0,
                            "money": 10
                        }
                    ]
                }
            ]
        }
    ]
}

导出接口

目前没有导出接口哦:(((

Planet工作室