Interface NotificationService

All Superinterfaces:
BaseService
All Known Implementing Classes:
InMemoryNotificationService

public interface NotificationService extends BaseService
Notification service interface

通知服务接口

  • Method Details

    • sendBossBarNotification

      boolean sendBossBarNotification(org.bukkit.entity.Player player, String message)
      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

      boolean sendBossBarNotification(org.bukkit.entity.Player player, String message, int seconds)
      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 seconds

      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.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 seconds

      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

    • 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 seconds

      Boss 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 seconds

      Boss 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

      boolean sendMessageNotification(org.bukkit.entity.Player player, String message)
      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

      boolean sendSubTitleNotification(org.bukkit.entity.Player player, String subtitle)
      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

      boolean sendTitleNotification(org.bukkit.entity.Player player, String title, String subtitle)
      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

      boolean sendActionBarNotification(org.bukkit.entity.Player player, String message)
    • sendToastNotification

      boolean sendToastNotification(org.bukkit.entity.Player player, String icon, String message, Toast.Style style)