差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
插件手册:betonquest:通知提示 [2020/10/25 00:12] 小小k酱 [NotifyIO通知方式] |
插件手册:betonquest:通知提示 [2020/10/25 00:48] (当前版本) 小小k酱 [Example 1 - Custom Notifications] |
||
---|---|---|---|
行 94: | 行 94: | ||
==== 静默: Suppress ==== | ==== 静默: Suppress ==== | ||
- | Does not output anything. Can be used to stop notifications. | + | 不显示任何通知。可用于阻止显示某个通知。 |
==== 聊天框: Chat ==== | ==== 聊天框: Chat ==== | ||
- | Writes the notification to the players chat. | + | 在玩家的聊天框显示通知。 |
- | ^ | + | ^ |
- | | sound | Sound to play. If blank, no sound. Can be from [[https:// | + | | sound | 播放什么声音,如果为空则不播放任何声音。请参考[[https:// |
==== 成就框: Advancement ==== | ==== 成就框: Advancement ==== | ||
- | Shows the notification using an achievement popup. | + | 弹出一个成就框并显示通知。 |
- | ^ | + | ^ |
- | | sound | Sound to play. If blank, no sound. Can be from [[https:// | + | | sound | 播放什么声音,如果为空则不播放任何声音。请参考[[https:// |
- | | frame | What Achievement frame to use. Can be: '' | + | | frame | 什么类型的边框。可以是'' |
- | | icon | What icon to show. Must be the vanilla name of an item. Example: | + | | icon | 用什么方块作为标志。必须填写Minecraft原生方块ID,比如'' |
- | ==== 快捷栏上方: Actionbar ==== | + | ==== 动作栏: Actionbar ==== |
- | Shows the notification using the actionbar. | + | 在动作栏(在快捷物品栏上方)显示通知。 |
- | ^ | + | ^ |
- | | sound | Sound to play. If blank, no sound. Can be from [[https:// | + | | sound | 播放什么声音,如果为空则不播放任何声音。请参考[[https:// |
==== Boss血条: Bossbar ==== | ==== Boss血条: Bossbar ==== | ||
- | Shows the notification using a bossbar. | + | 在Boss血条显示通知。 |
^ Option | ^ Option | ||
- | | sound | Sound to play. If blank, no sound. Can be from [[https:// | + | | sound | 播放什么声音,如果为空则不播放任何声音。请参考[[https:// |
- | | barFlags | What flags to add to bossbar. One of the following from [[https:// | + | | barFlags | 添加额外Bossbar效果,效果列表请参见[[https:// |
- | | barColor | What color to draw the bar. One of the following from [[https:// | + | | barColor | 血条颜色。可选的颜色列表请参见[[https:// |
- | | progress | What progress to show the bar. A floating point number between | + | | progress | 血条进度。小数,数值介于0.0(空)和1.0(满血)之间。 |
- | | style | What style bar to use. One of the following from [[https:// | + | | style | 血条款式。款式列表请参见[[https:// |
- | | stay | How many ticks to keep the bar on screen. Defaults to 70 | | + | | stay | 血条在屏幕上的持续时间。单位ticks,默认值是70ticks(约等于3.5秒)。 |
- | | countdown | If set, will step the progress of the bar by countdown steps. For example, if set to 10, then 10 times during the time it is on the screen the progress will drop by 1/10 | | + | | countdown | 倒计时。如果设置了,血条长度会根据此数值递减。例如,当数值设置为10时,血条会在持续时间之内每次递减1/10。 | |
==== 标题: Title ==== | ==== 标题: Title ==== | ||
- | Shows the notification using a title. | + | 通过标题显示通知。 |
- | ^ | + | ^ |
- | | sound | Sound to play. If blank, no sound. Can be from [[https:// | + | | sound | 播放什么声音,如果为空则不播放任何声音。请参考[[https:// |
- | | fadeIn | Ticks to fade the title in. Default | + | | fadeIn | 淡入时长。单位ticks,默认值是10。 | |
- | | stay | Ticks to keep title on screen. Default | + | | stay | 持续时长。单位Ticks,默认值是70。 | |
- | | fadeOut | Ticks to fade the title out. Default | + | | fadeOut | 淡出时长。单位Ticks,默认值是20。 | |
- | | subTitle | Optional subtitle to show. All _'s are replaced with spaces | + | | subTitle | 副标题内容。如果不为空则额外再显示一个副标题,文字中的下划线'' |
==== 副标题: Subtitle ==== | ==== 副标题: Subtitle ==== | ||
- | Shows the notification using a subtitle. | + | 在副标题显示通知。 |
- | ^ | + | ^ |
- | | sound | Sound to play. If blank, no sound. Can be from [[https:// | + | | sound | 播放什么声音,如果为空则不播放任何声音。请参考[[https:// |
- | | fadeIn | Ticks to fade the title in. Default | + | | fadeIn | 淡入时长。单位ticks,默认值是10。 | |
- | | stay | Ticks to keep title on screen. Default | + | | stay | 持续时长。单位Ticks,默认值是70。 | |
- | | fadeOut | Ticks to fade the title out. Default | + | | fadeOut | 淡出时长。单位Ticks,默认值是20。 | |
===== 自定义通知 ===== | ===== 自定义通知 ===== | ||
- | Using the '' | + | 通过'' |
===== 例子 ===== | ===== 例子 ===== | ||
- | ==== Example | + | ==== 例子 |
- | Assuming the following | + | 假设你的custom.yml文件如下: |
<code yaml [enable_line_numbers=" | <code yaml [enable_line_numbers=" | ||
notifications: | notifications: | ||
- | # Test Categories | + | # 测试通知类别 |
test_suppress: | test_suppress: | ||
io: suppress | io: suppress | ||
行 200: | 行 199: | ||
</ | </ | ||
- | And the following events run in order: | + | 并且下列// |
<code yaml [enable_line_numbers=" | <code yaml [enable_line_numbers=" | ||
- | # Test of Category | + | # 测试通知类别 |
notify_cat_suppress: | notify_cat_suppress: | ||
notify_cat_chat: | notify_cat_chat: | ||
行 211: | 行 210: | ||
notify_cat_subtitle: | notify_cat_subtitle: | ||
- | # Test of Category | + | # 测试通知类别 |
notify_catcus_title_sub: | notify_catcus_title_sub: | ||
notify_catcus_bossbar_red: | notify_catcus_bossbar_red: | ||
- | # Test of totally custom, needs an io | + | # 测试完全自定义参数+一些NotifyIO |
notify_cus_bossbar_green: | notify_cus_bossbar_green: | ||
notify_cus_advancement: | notify_cus_advancement: | ||
</ | </ | ||
- | A video can be found [[https:// | + | 运行效果请参考[[https:// |
- | ==== Example | + | ==== 例子 |
- | Assuming the following events run in order: | + | 假设有下列// |
<code yaml [enable_line_numbers=" | <code yaml [enable_line_numbers=" | ||
notify_cus_bossbar_countdown1: | notify_cus_bossbar_countdown1: | ||
行 229: | 行 228: | ||
</ | </ | ||
- | A video can be found [[https:// | + | 执行效果请参考[[https:// |
- | ==== Example | + | ==== 例子 |
- | If you don't want to see the '' | + | 如果你不想对玩家显示'' |
- | Example | + | custom.yml例子: |
<code yaml [enable_line_numbers=" | <code yaml [enable_line_numbers=" | ||
notifications: | notifications: |