关于此插件
想要以富有创意的方式回馈你的玩家吗?不妨试试活动!
借助本插件,你可以通过活动和箱子发放奖励,并专注于轻松自定义。
概览:箱子
箱子是具有自定义样式、可以打开以发放多种奖励的容器。你可以创建多个箱子,每个箱子都拥有独立的战利品池。你可以配置奖励的稀有度及其外观表现。
许多内容可以在图形用户界面(GUI)中进行配置。基础命令为 /crate <子命令>。所有可用命令的列表详见下方的「全部命令」部分。
若想快速了解整体功能,/crate list 是一个很好的起点。
奖励:
奖励可以是从简单的物品掉落,到复杂的开启流程。作为奖励,可以触发多个“事件”。你可以:
- 掉落物品
- 播放音效
- 向玩家发送消息
- 执行命令(以服务器身份)
- 在“事件”之间添加延迟
一个更复杂的奖励可能如下所示:
我们播放一段音效,向玩家发送“传说奖励”的提示,并显示聊天栏倒计时。随后掉落奖励(一个信标),附带粒子效果,并广播谁获得了传说奖励。为了避免每次都需要重新配置,奖励和整个宝箱都是可克隆的(翡翠按钮)。
此外,由于玩家名称和位置是动态的,你可以在聊天和命令消息中使用“替换代码”。更多信息请参阅本 README 末尾的“替换代码”部分。
查看奖池:
如果配置项 crates.normal-players.view-lootpool 为 true,非 OP 玩家可以通过在主手持有木箱并运行 /crates loot 来预览每个奖励的掉落概率。
保底机制:
对于每个木箱,你可以启用保底机制。其工作原理如下:
如果玩家即将从同一稀有度等级(相同掉落概率)中抽取到相同的奖励,保底机制会选择一个不同的随机奖励。
示例:该木箱有四种可能的掉落物:70% 泥土、10% 钻石、10% 下界合金、10% 信标。玩家开启了多个木箱。首先他们获得了钻石,然后获得了几次泥土掉落(泥土不受保底影响,因为它是唯一的 70% 掉落物)。当他们即将再次获得钻石时,保底机制激活:因为他们已经获得了 10% 概率的钻石,系统将改为给予另一个 10% 稀有度的奖励(下界合金或信标)。
概述:掉落事件
在掉落事件中,你配置的随机奖励会从空中落下,玩家可以竞争收集尽可能多的奖励。你可以通过选择是否在聊天中公告掉落事件、玩家是否可以传送至掉落事件地点等选项,将其配置为私有或公开。
基础命令为 /dropevent <子命令> 或 /de <子命令>。所有命令列表详见下方“全部命令”部分。
若要概览,可使用 /de list 作为起点。
设置:
通过在列表 GUI 中点击某个事件,或运行 /de info abc 来打开设置。
您可以配置以下内容:
- 范围:掉落物从起始位置起算的最大距离。
- 持续时间:掉落事件持续的时间。
- 掉落物品:事件期间掉落的物品总量。
- 倒计时:玩家在游戏开始前可以准备的时间。
- 广播:是否使用自定义广播来宣布掉落事件,并可选择显示其位置和传送选项(见下一个设置)。
- 可传送性:广播消息中是否包含“传送”按钮,供玩家传送到该事件,或者使用
/de tp <code>。玩家只能在使用一次且仅在掉落事件进行期间传送到该位置。
- 渲染物品:配置事件在列表中的显示方式,以及玩家可用于启动事件的物品外观。
- 启动命令:倒计时结束后由控制台执行的命令。
- 最低在线玩家数:启动掉落事件前所需的最低在线玩家数量。
从此页面您还可以进入事件的战利品池、启动事件(可选跳过倒计时)、克隆事件或删除它。
战利品池:
在战利品池中,您可以配置哪些物品应该掉落及其掉落概率。您可以将各种物品设置为掉落物——例如:箱子。
注意: 由于每次掉落都是随机选择的,并受几率修正影响,实际掉落的不同稀有度物品的数量可能会与预期值略有偏差。
事件启动物品:
管理员可以从信息屏幕或使用命令 /de start <event name> <optional: location name> 启动事件。非管理员玩家无法通过这些方式启动事件。若要允许非管理员玩家启动事件,请使用 /de give <player name> <dropevent name> <amount> 给他们启动物品(或将这些物品添加到箱子等容器中)。持有启动物品的玩家可以在满足要求的情况下,通过蹲下并右键单击在其所在位置启动事件。
警告: 默认情况下禁用启动物品。要启用它们,请将 dropevents.normal-players.usable 设置为 true。
更多配置
聊天消息:
插件发送给玩家的大多数消息均可编辑。请在 <YourServerFolder>/plugins/CratesAndDropevents/messages.yml 中编辑它们。
消息采用 MiniMessage 格式。有关样式设置的详细信息,请点击此处。
文件更改在服务器重启或运行 /cad reload 后生效。
设置:
有一些全局设置,可以通过运行 /cad config 查看。它们可以通过运行 /cad config <key> <value> 进行修改。
说明:
dropevents.simultaneous-limit.count:设置同时发生的 Dropevent 的最大数量。
dropevents.simultaneous-limit.active:定义是否应用上述设置。
dropevents.normal-players.usable:定义非 OP 玩家是否能够使用 Dropevent 启动物品。
dropevents.forbidden-worlds:一个世界列表,在这些世界中无法启动 Dropevent。
dropevents.hopper-prevention:在 Dropevent 开始前检查区域内是否存在漏斗;如果检测到漏斗,则禁止启动。
dropevents.ops-override-restrictions:如果为 true,OP(或拥有权限的玩家)可以覆盖限制(玩家数量、维度、漏斗)并启动 Dropevent。
dropevents.bossbar-countdown:在预启动倒计时期间显示 Boss 条倒计时,指示 Dropevent 何时开始。
dropevents.starter-dragon:定义在 Dropevent 开始时是否生成一条正在死亡的龙(动画效果)。
crates.normal-players.view-lootpool:定义普通玩家是否可以使用 /crates loot 命令查看箱子战利品池。
gui.play-sounds:定义 GUI 物品在被点击时是否播放声音。
请注意,存在不同的数据类型,例如数字、布尔值(真/假)、列表等。如果您尝试将某项设置更改为不匹配的数据类型,例如将 dropevents.simultaneous-limit.count 设置为 abc,系统将会拒绝该操作并提示 Mismatched data types(数据类型不匹配)。
编辑列表时会切换输入的值:如果该值已存在,则将其移除;如果不存在,则将其添加。
替换代码
部分聊天消息和命令支持“替换代码”——即会被动态数据替换的占位符。
聊天消息:
以下聊天元素可以使用替换代码:
dropevent.broadcast.local.countdown
dropevent.broadcast.local.start
dropevent.broadcast.local.end
dropevent.broadcast.global.countdown
dropevent.broadcast.tp-prompt.chat
dropevent.broadcast.tp-prompt.hover
以下序列将被替换:
%c:Dropevent 的 x、y 和 z 坐标,以逗号分隔。
%w:Dropevent 所在世界的名称。
%t:Dropevent 的倒计时秒数。这指的是配置的最大倒计时值,而非当前剩余时间。
%n:Dropevent 的名称。
%l:“位置名称”。该名称在通过命令启动 Dropevent 并添加此可选值时定义(/de start <event name> <location name>)。
%h:启动 Dropevent 的玩家名称。
特殊情况:%p
可以使用代码 %p 将传送到事件的按钮插入到消息中。仅当可以传送至该事件时,此按钮才会显示。该按钮在视觉上由 dropevent.broadcast.tp-prompt.chat 和 dropevent.broadcast.tp-prompt.hover 定义,因此只能插入到前面提到的其他 4 条消息中。
命令:
Dropevent 启动时的命令:
Dropevent 启动时运行的命令支持以下替换代码:
%p:启动事件的玩家名称。
%w:Dropevent 所在的世界键名。
%l:Dropevent 启动的位置。
命令奖励:
箱子奖励序列中的命令具有以下替换代码:
%p:打开箱子的玩家名称。
%w:箱子被打开的世界键名。
%l:箱子放置的位置。
集成
Vault
如果您安装了经济插件和 Vault,则可以构建给予玩家金钱的奖励。
ShopsGUIPlus
原生支持 DropEvent 物品——易于实现
示例 - 使用方法:
1:
type: item
item:
cad:
dropEventId: <id>
buyPrice: 10
slot: 1
设置您要使用的 DropEvent 物品的 ID,它将从 CAD 自动获取最新版本并保持始终更新。
所有命令
| 命令语法 |
说明 |
/de clone <id> <name> <folder> |
克隆掉落事件。名称和文件夹为可选参数。 |
/de create <name> <folder> |
创建新的掉落事件。事件的名称和文件夹为可选参数。 |
/de edit <id> <key> <value> |
更新掉落事件的设置。可能的键值可在标签补全中查看。 |
/de give <player> <id> <amount> |
向玩家发放掉落事件的起始物品。数量可选,默认为1。 |
/de info <id> |
显示掉落事件的设置界面。 |
/de list |
显示所有掉落事件的列表。 |
/de move <id> <folder> |
将掉落事件移动到其他文件夹。 |
/de remove <id> |
删除一个掉落事件。 |
/de start <id> <location> |
启动一个掉落事件。位置为可选参数,用于在消息中显示的位置名称。 |
/de start-now <id> |
无倒计时直接启动一个掉落事件。 |
/de stopall |
停止所有正在进行的掉落事件。 |
/de tp <code> |
传送至当前正在进行的掉落事件。代码可通过标签补全查看。普通玩家也可使用。 |
| /crate clone <id> <name> <folder> | 克隆一个箱子。克隆箱子的名称和文件夹为可选参数。 |
| /crate create <name> <folder> | 创建一个新的箱子。箱子的名称和文件夹为可选参数。 |
| /crate delete <id> | 删除一个箱子。 |
| /crate give <player> <id> <amount> | 给玩家发放一个箱子。数量为可选参数,默认为 1。 |
| /crate info <id> | 显示某个箱子的设置界面。 |
| /crate list | 显示所有箱子列表。 |
| /crate loot | 显示手中所持箱子的掉落池(如果允许)。普通玩家也可使用。 |
| /crate move <id> <folder> | 将箱子移动到另一个文件夹。 |
| /crate rewards <id> | 显示某个箱子的奖励设置页面。 |
| /crate url <id> <url> | 设置箱子头部的 URL。 |
| /cad cancel | 取消当前输入。 |
| /cad config | 显示当前配置。 |
| /cad config <key> <value> | 更改配置值。 |
| /cad reload | 重新加载配置。 |
| /cad version | 显示插件版本。 |
About this plugin
Want to give something back to your players in a creative way? How about events?
With this plugin you can give out rewards using events and crates, with a focus on easy customization.
Overview: Crates
Crates are boxes with a custom style that can be opened to give a variety of rewards. You can create multiple crates, each with its own loot pool. You can configure how rare a reward is and what it should look like.
Many things can be configured in the GUI. The base command is /crate <subcommand>. The list of all commands is listed below under 'All commands'.
To gain an overview /crate list is a good starting point.
Rewards:
Rewards can range from simple item drops to complex opening procedures. It is possible to trigger multiple 'events' as a reward. You can:
- Drop items
- Play sounds
- Send the player a message
- Run a command (as the server)
- Add a delay between 'events'
This is how a more sophisticated reward could look:
We play a sound, send "Legendary reward" to the player and show a chat countdown. Then we drop the reward (a Beacon) with particles and broadcast who pulled the legendary reward. Since we don't want to configure it every time, rewards and entire crates are clonable (Emerald button).
Additionally, because player names and locations are dynamic, you can use 'replacement codes' in chat and command messages. For more info, see 'Replacement codes' at the end of this README.
View Lootpool:
If the config crates.normal-players.view-lootpool is true, non-op players are able to preview the drop chance of each reward by holding a crate in their main hand and running /crates loot.
Pity system:
For each crate, you can enable a pity system. It works as follows:
If a player is about to pull the same reward in the same rarity class (same drop chance), the pity system chooses a
random different reward.
Example: The crate has four possible drops: 70% dirt, 10% diamond, 10% netherite, 10% beacon. A player opens several crates.
They first get a diamond, then a few dirt drops (dirt is not subject to pity because it is the only 70% drop). When they are
about to get a diamond again, the pity system activates: because they already received the 10% diamond, the system will
instead grant a different 10% rarity reward (either netherite or beacon).
Overview: Dropevents
In a Dropevent, random rewards that you configure fall from the sky and players can compete to collect as many as they can. You can configure them to be private or public by choosing whether dropevents are announced in chat, whether players can teleport to them, and so on.
The base command is /dropevent <subcommand> or /de <subcommand>. The list of all commands is listed below under 'All commands'.
To gain an overview /de list is a good starting point.
Settings:
Open the settings by clicking an event in the list GUI or by running /de info abc
You are able to configure the following:
- Range: Up to what distance from the start location drops can occur
- Duration: How long the Dropevent runs for
- Dropped items: Total amount of items dropped during the event
- Countdown: How long players have to prepare before the Dropevent starts.
- Broadcasting: Whether a customizable broadcast announces the Dropevent, optionally showing its location and a teleport option (see next setting).
- Teleportable: Whether the broadcast message includes a 'Teleport' button for players to teleport to the event or
alternatively use
/de tp <code>. Players can teleport to the location once and only as long as the Dropevent takes place.
- Render item: Configure how the event is shown in the list and how the item players can obtain to start events appears.
- Command on startup: Command executed by the console when the countdown finishes.
- Min. players to start: Minimum number of online players required before the Dropevent can be started.
From this page you also can go to the event's loot pool, start the event (optionally without a countdown), clone the event, or delete it.
Loot pool:
In the loot pool you can configure which items should be dropped and their drop chances. You can set all kinds of items as
drops - for example: Crates.
Note: Because each drop is chosen randomly and influenced by chance modifiers, the actual number of drops of a given rarity may deviate slightly from the expected value.
Event starter item:
Operators can start events from the info screen or with the command /de start <event name> <optional: location name>. Non-op players aren't able to
start events in these ways. To allow non-ops to start events, give them starter items using /de give <player name> <dropevent name> <amount> (or adding those items to Crates etc.).
A player holding a starter item can start an event at their location (if requirements are met) by crouching and right-clicking.
Warning: Starter items are disabled by default. To enable them, set dropevents.normal-players.usable
to true.
More configurations
Chat messages:
Most messages the plugin sends to players are editable. Edit them in
<YourServerFolder>/plugins/CratesAndDropevents/messages.yml.
The messages are in the MiniMessage-Format. For info on styling click here.
File changes take effect after a server restart or after running /cad reload.
Settings:
There are some global settings, which can be viewed by running /cad config.
They can be changed by running /cad config <key> <value>.
Explanation:
dropevents.simultaneous-limit.count: Sets the maximum number of Dropevents that can take place at the same time.
dropevents.simultaneous-limit.active: Defines, whether the previous setting is applied.
dropevents.normal-players.usable: Defines, whether non-op players are able to use Dropevent starter items.
dropevents.forbidden-worlds: A list of worlds where Dropevents cannot be started.
dropevents.hopper-prevention: Checks the area for hoppers before the Dropevent starts; if hoppers are found the start is denied.
dropevents.ops-override-restrictions: If true, Ops (or players with permission) can override restrictions (player count, dimension, hoppers) and start Dropevents.
dropevents.bossbar-countdown: Shows a bossbar countdown during the pre-start countdown indicating when the Dropevent will start.
dropevents.starter-dragon: Defines whether a dying dragon (the animation) spawns, when a Dropevent starts.
crates.normal-players.view-lootpool: Defines whether normal players can view a crate's loot pool with /crates loot.
gui.play-sounds: Defines whether gui items play a sound when clicked.
Note that there are different data types, such as Numbers, True/False values, Lists and so on. If you try to change a
setting to a false data type, for example dropevents.simultaneous-limit.count to abc this will get rejected with the
message Mismatched data types.
Editing a list toggles the entered value: if it exists it will be removed; if it doesn't it will be added.
Replacement codes
Some chat messages and commands are subject to 'replacement codes' - placeholders that get replaced with dynamic data.
Chat messages:
The following chat elements can use replacement codes:
dropevent.broadcast.local.countdown
dropevent.broadcast.local.start
dropevent.broadcast.local.end
dropevent.broadcast.global.countdown
dropevent.broadcast.tp-prompt.chat
dropevent.broadcast.tp-prompt.hover
The following sequences are replaced:
%c: The x, y, and z coordinates of the Dropevent, separated by comma.
%w: The name of the world, the Dropevent takes place in.
%t: The Dropevent countdown in seconds. This refers to the configured maximum countdown value, not the current remaining time.
%n: The name of the Dropevent.
%l: The "location name". This name gets defined when starting a Dropevent by command and adding this optional
value (/de start <event name> <location name>)
%h: The name of the player who started the Dropevent.
Special Case: %p
The button to teleport to an event can be inserted to a message with the code %p. It only gets displayed if it is
possible to teleport to this event. This button visually defined in dropevent.broadcast.tp-prompt.chat
and dropevent.broadcast.tp-prompt.hover and can therefore only be inserted into the other 4 messages, previously mentioned.
Commands:
Command on Dropevent startup:
The command that runs when a Dropevent starts supports the following replacement codes:
%p: The name of the player starting the event.
%w: The world key the Dropevent takes place.
%l: The location where the Dropevent starts.
Command Reward:
Commands in reward sequences of Crates have the following replacement codes:
%p: The name of the player who opened the Crate.
%w: The world key the Crate got opened.
%l: The location where the Crate was placed
Integrations
Vault
If you have an economy plugin and Vault installed, you are able to build in rewards, that give the player money.
ShopsGUIPlus
Native DropEvent item support - easy implementation
Example - How to use:
1:
type: item
item:
cad:
dropEventId: <id>
buyPrice: 10
slot: 1
Set the ID of the DropEvent item you want to use and it will automatically pull the newest and always up-to-date version from CAD.
All commands
| Command Syntax |
Explanation |
/de clone <id> <name> <folder> |
Clones the dropevent. Name and folder of the clone are optional. |
/de create <name> <folder> |
Creates a new dropevent. Name and folder of the event are optional. |
/de edit <id> <key> <value> |
Updates a dropevents setting. Possible keys are listed in tab completion. |
/de give <player> <id> <amount> |
Gives a dropevent starter item to a player. Amount is optional and 1 by default. |
/de info <id> |
Shows the settings gui of a dropevent. |
/de list |
Shows a list of dropevents. |
/de move <id> <folder> |
Moves a dropevent to a different folder. |
/de remove <id> |
Removes a dropevent. |
/de start <id> <location> |
Starts a dropevent. Location is optional and used as the location name in messages. |
/de start-now <id> |
Starts a dropevent without a countdown. |
/de stopall |
Stops all dropevents. |
/de tp <code> |
Teleports to a dropevent taking place right now. Codes are shown in tab completion. Usable by regular players. |
/crate clone <id> <name> <folder> |
Clones a crate. Name and folder of the clone are optional. |
/crate create <name> <folder> |
Creates a new crate. Name and folder of the crate are optional. |
/crate delete <id> |
Deletes a crate. |
/crate give <player> <id> <amount> |
Gives a crate to a player. Amount is optional and 1 by default. |
/crate info <id> |
Shows the settings gui of a crate. |
/crate list |
Shows a list of crates. |
/crate loot |
Shows the loot pool of a crate held in hand (if allowed). Usable by regular players. |
/crate move <id> <folder> |
Moves a crate to a different folder. |
/crate rewards <id> |
Shows the rewards setinngs page of a crate. |
/crate url <id> <url> |
Sets the URL of the skull of a crate. |
/cad cancel |
Cancels the current input. |
/cad config |
Shows the current config. |
/cad config <key> <value> |
Changes a config value. |
/cad reload |
Reloads the config. |
/cad version |
Shows the plugin version. |
评论 0
登录后参与评分
还没有评论,来抢沙发吧