1
mirror of https://github.com/CarmJos/UltraDepository.git synced 2024-09-19 19:55:45 +00:00
UltraDepository/README.md

169 lines
6.8 KiB
Markdown
Raw Normal View History

2021-12-15 11:24:48 +00:00
```text
2021-12-28 11:41:58 +00:00
_ _ _ _ _____ _ _
| | | | | | | __ \ (_) |
| | | | | |_ _ __ __ _| | | | ___ _ __ ___ ___ _| |_ ___ _ __ _ _
| | | | | __| '__/ _` | | | |/ _ \ '_ \ / _ \/ __| | __/ _ \| '__| | | |
| |__| | | |_| | | (_| | |__| | __/ |_) | (_) \__ \ | || (_) | | | |_| |
\____/|_|\__|_| \__,_|_____/ \___| .__/ \___/|___/_|\__\___/|_| \__, |
| | __/ |
|_| |___/
2021-12-15 11:24:48 +00:00
```
2021-12-28 11:31:03 +00:00
# UltraDepository
2021-12-15 11:24:48 +00:00
2021-12-28 11:31:03 +00:00
[![version](https://img.shields.io/github/v/release/CarmJos/UltraDepository)](https://github.com/CarmJos/UltraDepository/releases)
[![License](https://img.shields.io/github/license/CarmJos/UltraDepository)](https://opensource.org/licenses/GPL-3.0)
[![workflow](https://github.com/CarmJos/UltraDepository/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/CarmJos/UltraDepository/actions/workflows/maven.yml)
![CodeSize](https://img.shields.io/github/languages/code-size/CarmJos/UltraDepository)
![](https://visitor-badge.glitch.me/badge?page_id=UltraDepository.readme)
2021-12-15 11:24:48 +00:00
2021-12-28 11:31:03 +00:00
超级仓库插件,支持设定不同物品的存储仓库。
2021-12-15 11:24:48 +00:00
本插件基于Spigot实现**理论上支持全版本**。
2021-12-28 11:31:03 +00:00
本插件由 [墨豆Mordo](https://www.zimrs.cn) 赞助本人开发,经过授权后开源。
2021-12-15 11:24:48 +00:00
## 效果预览
## 插件依赖
- **[必须]** 插件本体基于 [Spigot-API](https://hub.spigotmc.org/stash/projects/SPIGOT)、[BukkitAPI](http://bukkit.org/) 实现。
- **[必须]** 经济部分基于 [VaultAPI](https://github.com/MilkBowl/VaultAPI) 实现。
- **[自带]** 数据部分基于 [EasySQL](https://github.com/CarmJos/EasySQL) 实现。
- **[可选]** 变量部分基于 [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) 实现。
2021-12-28 11:31:03 +00:00
详细依赖列表可见 [Dependencies](https://github.com/CarmJos/UltraDepository/network/dependencies) 。
2021-12-15 11:24:48 +00:00
## 特殊优势
2021-12-20 23:26:09 +00:00
## 插件指令
2021-12-28 11:31:03 +00:00
指令主指令为 /UltraDepository (/ud | /Depository)
<details>
<summary>展开查看所有子指令</summary>
```text
# sell <背包ID> <物品ID> <数量>
2021-12-28 11:31:03 +00:00
@ 玩家指令 (UltraDepository.Command.Sell)
- 售出对应数量的对应物品。
- 该指令受到玩家每日售出数量的限制。
# sellAll [背包ID] [物品ID]
2021-12-28 11:31:03 +00:00
@ 玩家指令 (UltraDepository.Command.SellAll)
- 售出所有相关物品。
- 该指令受到玩家每日售出数量的限制。
# info <玩家> [背包ID] [物品ID]
2021-12-28 11:31:03 +00:00
@ 管理指令 (UltraDepository.admin)
- 得到玩家的相关物品信息。
# add <玩家> <背包ID> <物品ID> <数量>
2021-12-28 11:31:03 +00:00
@ 管理指令 (UltraDepository.admin)
- 为玩家添加对应背包中对于物品的数量。
# remove <玩家> <背包ID> <物品ID> <数量>
2021-12-28 11:31:03 +00:00
@ 管理指令 (UltraDepository.admin)
- 为玩家减少对应背包中对于物品的数量。
# sell <玩家> [背包ID] [物品ID] [数量]
2021-12-28 11:31:03 +00:00
@ 管理指令 (UltraDepository.admin)
- 为玩家售出相关物品。
- 若不填写数量,则售出所有对应背包的对应物品。
- 若不填写物品,则售出对应背包内所有物品。
- 若不填写背包,则售出所有背包内所有物品。
- 该指令受到玩家每日售出数量的限制。
```
</details>
2021-12-20 23:26:09 +00:00
## 插件变量 ([PlaceholderAPI](https://www.spigotmc.org/resources/6245/))
变量部分基于 [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) 实现,如需使用变量请安装其插件。
<details>
<summary>展开查看所有变量</summary>
```text
2021-12-28 11:31:03 +00:00
# %UltraDepository_amount_<背包ID>_<物品ID>%
- 得到对应背包内对应物品的数量
2021-12-20 23:26:09 +00:00
2021-12-28 11:31:03 +00:00
# %UltraDepository_price_<背包ID>_<物品ID>%
- 得到对应背包内对应物品的价格
2021-12-28 11:31:03 +00:00
# %UltraDepository_sold_<背包ID>_<物品ID>%
- 得到对应背包内对应物品的今日售出数量
2021-12-28 11:31:03 +00:00
# %UltraDepository_limit_<背包ID>_<物品ID>%
- 得到对应背包内对应物品的每日售出限制
2021-12-28 11:31:03 +00:00
# %UltraDepository_remain_<背包ID>_<物品ID>%
- 得到对应背包内对应物品的剩余可售出数量
- $剩余可售出数量 = $每日售出限制 - $今日售出数量
2021-12-26 15:39:16 +00:00
2021-12-28 11:31:03 +00:00
# %UltraDepository_capacity_<背包ID>%
2021-12-26 15:39:16 +00:00
- 得到对应背包的容量
2021-12-20 23:26:09 +00:00
```
</details>
## 插件权限
2021-12-15 11:24:48 +00:00
## 配置文件
2021-12-28 11:31:03 +00:00
### [插件配置文件](src/main/resources/config.yml) (config.yml)
2021-12-20 23:26:09 +00:00
详见源文件。
2021-12-28 11:31:03 +00:00
### [消息配置文件](src/main/resources/messages.yml) (messages.yml)
2021-12-20 23:26:09 +00:00
详见源文件。
2021-12-28 11:41:58 +00:00
### 仓库配置文件 (depositories/<ID>.yml)
2021-12-20 23:26:09 +00:00
2021-12-28 11:41:58 +00:00
所有仓库配置均为单独的配置文件,存放于 `插件配置目录/depositories` 下,便于管理。
2021-12-20 23:26:09 +00:00
2021-12-28 11:41:58 +00:00
文件名即仓库的ID理论上可以随便取但**强烈推荐**使用纯英文,部分符号可能会影响正常读取,请避免使用。
2021-12-20 23:26:09 +00:00
2021-12-28 11:41:58 +00:00
这里准备了几个常用的仓库类型,可以 [在这里](.examples/depositories) 找到您需要的直接使用或加以修改后使用。
您也可以查看下方的示例,看到所有相关的配置,以制作您自己的仓库。
2021-12-20 23:26:09 +00:00
<details>
2021-12-28 11:41:58 +00:00
<summary>展开查看示例仓库配置</summary>
2021-12-20 23:26:09 +00:00
```yaml
```
</details>
2021-12-15 11:24:48 +00:00
## 支持与捐赠
若您觉得本插件做的不错,您可以捐赠支持我!
<img height=25% width=25% src="https://raw.githubusercontent.com/CarmJos/CarmJos/main/img/donate-code.jpg" alt=""/>
## 开源协议
本项目源码采用 [GNU General Public License v3.0](https://opensource.org/licenses/GPL-3.0) 开源协议。
2021-12-20 23:26:09 +00:00
<details>
<summary>关于 GPL 协议</summary>
2021-12-15 11:24:48 +00:00
> GNU General Public Licence (GPL) 有可能是开源界最常用的许可模式。GPL 保证了所有开发者的权利,同时为使用者提供了足够的复制,分发,修改的权利:
>
> #### 可自由复制
> 你可以将软件复制到你的电脑,你客户的电脑,或者任何地方。复制份数没有任何限制。
> #### 可自由分发
> 在你的网站提供下载拷贝到U盘送人或者将源代码打印出来从窗户扔出去环保起见请别这样做
> #### 可以用来盈利
> 你可以在分发软件的时候收费,但你必须在收费前向你的客户提供该软件的 GNU GPL 许可协议,以便让他们知道,他们可以从别的渠道免费得到这份软件,以及你收费的理由。
> #### 可自由修改
> 如果你想添加或删除某个功能,没问题,如果你想在别的项目中使用部分代码,也没问题,唯一的要求是,使用了这段代码的项目也必须使用 GPL 协议。
>
> 需要注意的是,分发的时候,需要明确提供源代码和二进制文件,另外,用于某些程序的某些协议有一些问题和限制,你可以看一下 @PierreJoye 写的 Practical Guide to GPL Compliance 一文。使用 GPL 协议,你必须在源代码代码中包含相应信息,以及协议本身。
>
> *以上文字来自 [五种开源协议GPL,LGPL,BSD,MIT,Apache](https://www.oschina.net/question/54100_9455) 。*
2021-12-20 23:26:09 +00:00
</details>