Interface NotificationService
- All Superinterfaces:
BaseService
- All Known Implementing Classes:
InMemoryNotificationService
通知服务接口
-
Method Summary
Modifier and TypeMethodDescriptionbooleansendActionBarNotification(org.bukkit.entity.Player player, String message) booleansendBossBarNotification(org.bukkit.entity.Player player, String message) Send a boss bar notification to a playerbooleansendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds) Send a boss bar notification to a playerbooleansendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds, org.bukkit.boss.BossBar bossBar) Send a boss bar notification to a playerbooleansendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds, org.bukkit.boss.BossBar bossBar, org.bukkit.Sound sound) Send a boss bar notification to a playerbooleansendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds, org.bukkit.Sound sound) Send a boss bar notification to a playerbooleansendMessageNotification(org.bukkit.entity.Player player, String message) Send a message notification to a playerbooleansendMessageNotification(org.bukkit.entity.Player player, String message, org.bukkit.Sound sound) Send a message notification to a playerbooleansendSubTitleNotification(org.bukkit.entity.Player player, String subtitle) Send a subtitle message notification to a playerbooleansendSubTitleNotification(org.bukkit.entity.Player player, String subtitle, org.bukkit.Sound sound) Send a subtitle message notification to a playerbooleansendTitleNotification(org.bukkit.entity.Player player, String title, String subtitle) Send a title message notification to a playerbooleansendTitleNotification(org.bukkit.entity.Player player, String title, String subtitle, org.bukkit.Sound sound) Send a title message notification to a playerbooleansendTitleNotification(org.bukkit.entity.Player player, String title, String subtitle, org.bukkit.Sound sound, int fadeIn, int stay, int fadeOut) Send a title message notification to a playerbooleansendToastNotification(org.bukkit.entity.Player player, String icon, String message, Toast.Style style) Methods inherited from interface com.ultikits.ultitools.interfaces.BaseService
getAuthor, getName, getResourceFolderName, getVersion
-
Method Details
-
sendBossBarNotification
Send a boss bar notification to a player向玩家发送Boss bar通知
- Parameters:
player- The player to send the boss bar to要发送Boss bar的玩家
message- The message to send要发送的消息
- Returns:
- Whether the boss bar was sent successfully
是否成功发送了Boss bar
-
sendBossBarNotification
Send a boss bar notification to a player向玩家发送Boss bar通知
- Parameters:
player- The player to send the boss bar to要发送Boss bar的玩家
message- The message to send要发送的消息
seconds- The duration of the boss bar in secondsBoss bar的持续时间(秒)
- Returns:
- Whether the boss bar was sent successfully
是否成功发送了Boss bar
-
sendBossBarNotification
boolean sendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds, org.bukkit.Sound sound) Send a boss bar notification to a player向玩家发送Boss bar通知
- Parameters:
player- The player to send the boss bar to要发送Boss bar的玩家
message- The message to send要发送的消息
seconds- The duration of the boss bar in secondsBoss bar的持续时间(秒)
sound- The sound to play when the boss bar is sent发送Boss bar时播放的声音
- Returns:
- Whether the boss bar was sent successfully
是否成功发送了Boss bar
-
sendBossBarNotification
boolean sendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds, org.bukkit.boss.BossBar bossBar) Send a boss bar notification to a player向玩家发送Boss bar通知
- Parameters:
player- The player to send the boss bar to要发送Boss bar的玩家
message- The message to send要发送的消息
seconds- The duration of the boss bar in secondsBoss bar的持续时间(秒)
bossBar- The boss bar to send要发送的Boss bar
- Returns:
- Whether the boss bar was sent successfully
是否成功发送了Boss bar
-
sendBossBarNotification
boolean sendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds, org.bukkit.boss.BossBar bossBar, org.bukkit.Sound sound) Send a boss bar notification to a player向玩家发送Boss bar通知
- Parameters:
player- The player to send the boss bar to要发送Boss bar的玩家
message- The message to send要发送的消息
seconds- The duration of the boss bar in secondsBoss bar的持续时间(秒)
bossBar- The boss bar to send要发送的Boss bar
sound- The sound to play when the boss bar is sent发送Boss bar时播放的声音
- Returns:
- Whether the boss bar was sent successfully
是否成功发送了Boss bar
-
sendMessageNotification
Send a message notification to a player向玩家发送消息通知
- Parameters:
player- The player to send the message to要发送消息的玩家
message- The message to send要发送的消息
- Returns:
- Whether the message was sent successfully
是否成功发送了消息
-
sendMessageNotification
boolean sendMessageNotification(org.bukkit.entity.Player player, String message, org.bukkit.Sound sound) Send a message notification to a player向玩家发送消息通知
- Parameters:
player- The player to send the message to要发送消息的玩家
message- The message to send要发送的消息
sound- The sound to play when the message is sent发送消息时播放的声音
- Returns:
- Whether the message was sent successfully
是否成功发送了消息
-
sendSubTitleNotification
Send a subtitle message notification to a player向玩家发送副标题消息通知
- Parameters:
player- The player to send the subtitle to要发送副标题的玩家
subtitle- The subtitle to send要发送的副标题
- Returns:
- Whether the subtitle was sent successfully
是否成功发送了副标题
-
sendSubTitleNotification
boolean sendSubTitleNotification(org.bukkit.entity.Player player, String subtitle, org.bukkit.Sound sound) Send a subtitle message notification to a player向玩家发送副标题消息通知
- Parameters:
player- The player to send the subtitle to要发送副标题的玩家
subtitle- The subtitle to send要发送的副标题
sound- The sound to play when the subtitle is sent发送副标题时播放的声音
- Returns:
- Whether the subtitle was sent successfully
是否成功发送了副标题
-
sendTitleNotification
Send a title message notification to a player向玩家发送标题消息通知
- Parameters:
player- The player to send the title to要发送标题的玩家
title- The title to send要发送的标题
subtitle- The subtitle to send要发送的副标题
- Returns:
- Whether the title was sent successfully
是否成功发送了标题
-
sendTitleNotification
boolean sendTitleNotification(org.bukkit.entity.Player player, String title, String subtitle, org.bukkit.Sound sound) Send a title message notification to a player向玩家发送标题消息通知
- Parameters:
player- The player to send the title to要发送标题的玩家
title- The title to send要发送的标题
subtitle- The subtitle to send要发送的副标题
sound- The sound to play when the title is sent发送标题时播放的声音
- Returns:
- Whether the title was sent successfully
是否成功发送了标题
-
sendTitleNotification
boolean sendTitleNotification(org.bukkit.entity.Player player, String title, String subtitle, org.bukkit.Sound sound, int fadeIn, int stay, int fadeOut) Send a title message notification to a player向玩家发送标题消息通知
- Parameters:
player- The player to send the title to要发送标题的玩家
title- The title to send要发送的标题
subtitle- The subtitle to send要发送的副标题
sound- The sound to play when the title is sent发送标题时播放的声音
fadeIn- The time in ticks for the title to fade in标题淡入的时间(ticks)
stay- The time in ticks for the title to stay标题停留的时间(ticks)
fadeOut- The time in ticks for the title to fade out标题淡出的时间(ticks)
- Returns:
- Whether the title was sent successfully
是否成功发送了标题
-
sendActionBarNotification
-
sendToastNotification
boolean sendToastNotification(org.bukkit.entity.Player player, String icon, String message, Toast.Style style)
-