插件手册:betonquest:通知提示

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
插件手册:betonquest:通知提示 [2020/10/25 00:35]
小小k酱 [副标题: Subtitle]
插件手册:betonquest:通知提示 [2020/10/25 00:48] (当前版本)
小小k酱 [Example 1 - Custom Notifications]
行 149: 行 149:
  
 ===== 自定义通知 ===== ===== 自定义通知 =====
-Using the ''notify'' event a custom notification can be sentIt can make use of any category defined or can override by directly defining the NotifyIO configuration options. Please refer to the Events-List chapter for more details on this event. +通过''notify''事件,你还可以随时随地显示自定义通知。在''notify''事件中你可以引用custom.yml中预先定义的NotifyIO,或直接编写一个。请参考[[插件手册:betonquest:事件列表#显示通知notify|事件列表-显示通知]]章节查看具体编写格式。
 ===== 例子 ===== ===== 例子 =====
  
-==== Example 1 - Custom Notifications ==== +==== 例子 1 - 自定义通知 ==== 
-Assuming the following custom.yml file:+假设你的custom.yml文件如下:
 <code yaml [enable_line_numbers="true"]> <code yaml [enable_line_numbers="true"]>
 notifications: notifications:
-    # Test Categories+    # 测试通知类别
     test_suppress:     test_suppress:
         io: suppress         io: suppress
行 200: 行 199:
 </code> </code>
  
-And the following events run in order:+并且下列//事件//会按顺序执行:
 <code yaml [enable_line_numbers="true"]> <code yaml [enable_line_numbers="true"]>
-Test of Category+测试通知类别
 notify_cat_suppress: notify Test Notify category:test_suppress notify_cat_suppress: notify Test Notify category:test_suppress
 notify_cat_chat: notify Test Notify category:test_chat notify_cat_chat: notify Test Notify category:test_chat
行 211: 行 210:
 notify_cat_subtitle: notify Test Notify category:test_subtitle notify_cat_subtitle: notify Test Notify category:test_subtitle
  
-Test of Category some custom+测试通知类别 一些自定义参数
 notify_catcus_title_sub: notify Test Notify category:test_title subtitle:"My SubTitle" notify_catcus_title_sub: notify Test Notify category:test_title subtitle:"My SubTitle"
 notify_catcus_bossbar_red: notify Test Notify category:test_bossbar barColor:red sound:ENTITY_BAT_TAKEOFF style:segmented_10 progress:0.3 notify_catcus_bossbar_red: notify Test Notify category:test_bossbar barColor:red sound:ENTITY_BAT_TAKEOFF style:segmented_10 progress:0.3
  
-Test of totally custom, needs an io+测试完全自定义参数+一些NotifyIO
 notify_cus_bossbar_green: notify Test Notify io:bossbar barColor:green stay:120 notify_cus_bossbar_green: notify Test Notify io:bossbar barColor:green stay:120
 notify_cus_advancement: notify Test Notify io:advancement icon:hopper frame:goal notify_cus_advancement: notify Test Notify io:advancement icon:hopper frame:goal
 </code> </code>
  
-A video can be found [[https://www.youtube.com/watch?v=mmEfIXp4dxA|here]]+运行效果请参考[[https://www.youtube.com/watch?v=mmEfIXp4dxA|这个视频]]
  
-==== Example 2 - Bossbar Countdown ==== +==== 例子 2 - Boss血条倒计时 ==== 
-Assuming the following events run in order:+假设有下列//事件//按顺序执行:
 <code yaml [enable_line_numbers="true"]> <code yaml [enable_line_numbers="true"]>
 notify_cus_bossbar_countdown1: notify Countdown Test Bossbar io:bossbar stay:120 countdown:10 progress:1 notify_cus_bossbar_countdown1: notify Countdown Test Bossbar io:bossbar stay:120 countdown:10 progress:1
行 229: 行 228:
 </code> </code>
  
-A video can be found [[https://i.imgur.com/x6Ihe7W.mp4|here]]+执行效果请参考[[https://i.imgur.com/x6Ihe7W.mp4|这个视频]]
  
-==== Example 3 - Using suppress on a builtin notification ==== +==== 例子 3 - 对内置的默认通知使用静默 ==== 
-If you don't want to see the ''changelog'' notifications then you can use the suppress notifyio for the category ''changelog''.+如果你不想对玩家显示''changelog''插件更新相关的通知,你可以使用“静默”''suppress''NotifyIO来强行关掉插件更新日志提示。
  
-Example custom.yml+custom.yml例子:
 <code yaml [enable_line_numbers="true"]> <code yaml [enable_line_numbers="true"]>
 notifications: notifications:
  • 插件手册/betonquest/通知提示.1603557358.txt.gz
  • 最后更改: 2020/10/25 00:35
  • 小小k酱