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

260 lines
9.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)
2021-12-29 15:10:33 +00:00
![Support](https://img.shields.io/badge/Minecraft-Java%201.13--Latest-green)
2021-12-28 11:31:03 +00:00
![](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实现**理论上支持全版本**。
2022-01-03 07:24:19 +00:00
本插件由 [墨豆Mordo](https://www.mordo.cn)、[子墨Zimrs](https://www.zimrs.cn) 资助本人开发,经过授权后开源。
2022-01-03 07:26:56 +00:00
2021-12-30 22:43:05 +00:00
## 功能介绍
本插件允许配置多个不同功能的仓库,玩家通过 击杀生物/挖掘方块/捡起收集 获得的原版物品可以自动被放入仓库中。
进入仓库后的物品玩家可以选择拿出或直接按量出售,且每日的出售数量上限和每件物品的价格可以自定义。
插件支持针对不同的权限配置仓库的容量,由此可以制作付费享用的”农业仓库“、”战斗仓库“、”伐木仓库“...
2022-01-03 07:38:12 +00:00
综上,该插件不但提供了一种功能特权,对其合理配置之后也将大大为玩家带来便利。
2021-12-15 11:24:48 +00:00
## 效果预览
<details>
<summary>收集物品</summary>
2021-12-29 21:10:03 +00:00
2021-12-29 09:31:24 +00:00
![collect](.documentation/images/collect-message.jpg)
</details>
<details>
<summary>仓库界面 (可自定义配置)</summary>
2021-12-29 09:31:24 +00:00
![item-gui](.documentation/images/item-in-gui.png)
</details>
<details>
<summary>出售界面</summary>
2021-12-29 09:31:24 +00:00
![sell-gui](.documentation/images/sell-gui.png)
![sell-message](.documentation/images/sell-message.png)
</details>
2021-12-29 09:31:24 +00:00
2021-12-15 11:24:48 +00:00
## 插件依赖
2022-01-04 23:05:23 +00:00
- **[必须]** 插件本体基于 [Spigot-API](https://hub.spigotmc.org/stash/projects/SPIGOT) 、 [BukkitAPI](http://bukkit.org/) 实现。
2022-01-04 21:33:17 +00:00
- **[自带]** 插件功能基于 [EasyPlugin](https://github.com/CarmJos/EasyPlugin) 实现。
2021-12-15 11:24:48 +00:00
- **[自带]** 数据部分基于 [EasySQL](https://github.com/CarmJos/EasySQL) 实现。
2021-12-29 21:10:03 +00:00
- 本插件连接池使用 [BeeCP](https://github.com/Chris2018998/BeeCP) ,更轻量、快速。
2021-12-29 09:27:02 +00:00
- **[推荐]** 变量部分基于 [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) 实现。
- **[推荐]** 经济部分基于 [VaultAPI](https://github.com/MilkBowl/VaultAPI) 实现。
2021-12-15 11:24:48 +00:00
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-28 14:48:27 +00:00
- 详细的变量与指令!
- 支持多种存储方式!
- 可自定义程度高,配置任何想要的仓库!
- 仓库容量权限配置,可给予特殊用户更大的仓库容量!
- 仓库自动收集物品提供API操作玩家数据
- ...
2021-12-20 23:26:09 +00:00
## 插件指令
2021-12-28 11:31:03 +00:00
指令主指令为 /UltraDepository (/ud | /Depository)
<details>
2021-12-29 09:35:31 +00:00
<summary>展开查看所有玩家指令</summary>
```text
# open [仓库ID]
@ 玩家指令 (UltraDepository.use)
- 打开对应仓库的界面。
# 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)
- 售出所有相关物品。
- 该指令受到玩家每日售出数量的限制。
2021-12-29 09:35:31 +00:00
```
</details>
2021-12-29 09:35:31 +00:00
<details>
2021-12-29 09:39:20 +00:00
<summary>展开查看所有后台指令</summary>
2021-12-29 09:35:31 +00:00
2021-12-29 09:39:20 +00:00
以下指令**只有后台**才可以使用可用于搭配变量自制玩家管理GUI。
2021-12-29 09:35:31 +00:00
```text
2021-12-29 09:39:20 +00:00
# info <玩家> [仓库ID] [物品ID]
- 得到玩家的相关物品信息。
# add <玩家> <仓库ID> <物品ID> <数量>
- 为玩家添加对应仓库中对于物品的数量。
2021-12-29 09:41:42 +00:00
# remove <玩家> <仓库ID> <物品ID> [数量]
- 为玩家减少对应仓库中对于物品的数量。
2021-12-29 09:41:42 +00:00
- 若不填写数量,则清空对应仓库的对应物品。
# sell <玩家> [仓库ID] [物品ID] [数量]
- 为玩家售出相关物品。
- 若不填写数量,则售出所有对应仓库的对应物品。
- 若不填写物品,则售出对应仓库内所有物品。
- 若不填写仓库,则售出所有仓库内所有物品。
- 该指令受到玩家每日售出数量的限制。
```
2021-12-29 21:10:03 +00:00
</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
# %UltraDepository_amount_<仓库ID>_<物品ID>%
- 得到对应仓库内对应物品的数量
2021-12-20 23:26:09 +00:00
# %UltraDepository_price_<仓库ID>_<物品ID>%
- 得到对应仓库内对应物品的价格
# %UltraDepository_sold_<仓库ID>_<物品ID>%
- 得到对应仓库内对应物品的今日售出数量
# %UltraDepository_limit_<仓库ID>_<物品ID>%
- 得到对应仓库内对应物品的每日售出限制
# %UltraDepository_remain_<仓库ID>_<物品ID>%
- 得到对应仓库内对应物品的剩余可售出数量
- $剩余可售出数量 = $每日售出限制 - $今日售出数量
2021-12-26 15:39:16 +00:00
# %UltraDepository_capacity_<仓库ID>%
- 得到对应仓库的容量
# %UltraDepository_used_<仓库ID>%
- 得到已使用的仓库容量
# %UltraDepository_usable_<仓库ID>%
- 得到剩余可使用的仓库容量
2021-12-20 23:26:09 +00:00
```
</details>
## 插件权限
2021-12-28 12:06:28 +00:00
<details>
<summary>展开查看所有权限</summary>
```text
# UltraDepository.use
- 超级仓库的基本使用权限 (默认所有人都有)
# UltraDepository.silent
- 拥有该权限将不再接收到放入背包的提示。
2021-12-28 12:06:28 +00:00
# UltraDepository.Command.Sell
- 玩家使用Sell指令的权限
# UltraDepository.Command.SellAll
- 玩家使用SellAll指令的权限
# UltraDepository.auto
- 超级仓库的自动收集权限
# UltraDepository.auto.enable
- 用于判断是否启用了自动收集功能
2021-12-30 22:43:05 +00:00
- 若玩家有"UltraDepository.auto"权限,且玩家有该权限,则会开始为玩家自动收集物品。
- 若玩家缺失该权限或“UltraDepository.auto”权限则自动收集物品功能不会启用。
2021-12-28 12:06:28 +00:00
- 您可以自己使用GUI创建一个按钮后通过给玩家添加/删除该权限决定玩家是否开启自动收集。
# UltraDepository.admin
- "超级仓库的管理权限"
```
</details>
2021-12-15 11:24:48 +00:00
## 配置文件
2021-12-29 23:20:37 +00:00
### 插件配置文件 ([config.yml](src/main/resources/config.yml))
2021-12-20 23:26:09 +00:00
详见源文件。
2021-12-29 23:20:37 +00:00
### 消息配置文件 ([messages.yml](src/main/resources/messages.yml))
2021-12-20 23:26:09 +00:00
详见源文件。
2021-12-29 23:20:37 +00:00
### 仓库配置文件 ([depositories/<仓库ID>.yml](.examples/depositories/full-example.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-29 23:20:37 +00:00
文件名即仓库的ID**强烈推荐使用纯英文**,部分符号可能会影响正常读取,请避免使用。
2021-12-20 23:26:09 +00:00
2022-01-04 20:42:49 +00:00
随本项目预设了几个常用的仓库类型,可以 [在这里](.examples/depositories) 找到您需要的仓库配置加以修改后使用。
2021-12-28 11:41:58 +00:00
2021-12-29 23:20:37 +00:00
您也可以 [点击这里](.examples/depositories/full-example.yml) 查看一份*详细的仓库配置示例*,以制作您自己的仓库。
2021-12-20 23:26:09 +00:00
2022-01-04 20:39:27 +00:00
## 开发
详细开发介绍请 [点击这里](.documentation/README.md) , JavaDoc(最新Release) 请 [点击这里](https://carmjos.github.io/UltraDepository) 。
2021-12-30 18:32:31 +00:00
## 使用统计
2022-01-02 02:01:48 +00:00
[![bStats](https://bstats.org/signatures/bukkit/UltraDepository.svg)](https://bstats.org/plugin/bukkit/UltraDepository/13777)
2021-12-30 18:32:31 +00:00
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>