Class Message

java.lang.Object
pro.cloudnode.smp.cloudnodemsg.Message

public final class Message extends Object
  • Field Details

    • console

      @NotNull public static final @NotNull OfflinePlayer console
    • REPLY_TO

      @NotNull public static final @NotNull NamespacedKey REPLY_TO
    • IGNORED_PLAYERS

      @NotNull public static final @NotNull NamespacedKey IGNORED_PLAYERS
    • CHANNEL_RECIPIENT

      @NotNull public static final @NotNull NamespacedKey CHANNEL_RECIPIENT
    • CHANNEL_TEAM

      @NotNull public static final @NotNull NamespacedKey CHANNEL_TEAM
    • INCOMING_ENABLED

      @NotNull public static final @NotNull NamespacedKey INCOMING_ENABLED
  • Constructor Details

  • Method Details

    • send

      public void send() throws InvalidPlayerError
      Throws:
      InvalidPlayerError
    • send

      public void send(@NotNull @NotNull Message.Context context) throws InvalidPlayerError
      Throws:
      InvalidPlayerError
    • offlinePlayer

      @NotNull public static @NotNull OfflinePlayer offlinePlayer(@NotNull @NotNull CommandSender executor)
    • sendMessage

      public static void sendMessage(@NotNull @NotNull OfflinePlayer recipient, @NotNull @NotNull Component message)
    • sendSpyMessage

      public static void sendSpyMessage(@NotNull @NotNull OfflinePlayer sender, @NotNull @NotNull OfflinePlayer recipient, @NotNull @NotNull Component message)
      Send social spy to online players with permission
    • setReplyTo

      public static void setReplyTo(@NotNull @NotNull OfflinePlayer sender, @NotNull @NotNull OfflinePlayer recipient)
    • getReplyTo

      @NotNull public static @NotNull Optional<@NotNull OfflinePlayer> getReplyTo(@NotNull @NotNull OfflinePlayer player)
    • removeReplyTo

      public static void removeReplyTo(@NotNull @NotNull OfflinePlayer player)
    • getIgnored

      @NotNull public static @NotNull HashSet<@NotNull UUID> getIgnored(@NotNull @NotNull Player player)
      Get UUID set of ignored players from PDC string
      Parameters:
      player - The player
    • isIgnored

      public static boolean isIgnored(@NotNull @NotNull Player player, @NotNull @NotNull OfflinePlayer ignored)
      Check if a player is ignored
      Parameters:
      player - The player
      ignored - The ignored player
    • ignore

      public static void ignore(@NotNull @NotNull Player player, @NotNull @NotNull OfflinePlayer ignore)
      Ignore a player
      Parameters:
      player - The player
      ignore - The player to ignore
    • unignore

      public static void unignore(@NotNull @NotNull Player player, @NotNull @NotNull OfflinePlayer ignored)
      Unignore a player
      Parameters:
      player - The player
      ignored - The player to unignore
    • incomingEnable

      public static void incomingEnable(@NotNull @NotNull Player player)
      Allows player to receive private messages
      Parameters:
      player - The player
    • incomingDisable

      public static void incomingDisable(@NotNull @NotNull Player player)
      Denies player to receive private messages
      Parameters:
      player - The player
    • isIncomingEnabled

      public static boolean isIncomingEnabled(@NotNull @NotNull Player player)
      Check if a player allows private messages
      Parameters:
      player - The player
    • createChannel

      public static void createChannel(@NotNull @NotNull Player player, @NotNull @NotNull OfflinePlayer recipient)
      Create DM channel to player
      Parameters:
      player - The player (you)
      recipient - The other end of the channel
    • exitChannel

      public static void exitChannel(@NotNull @NotNull Player player)
      Exit DM channel
      Parameters:
      player - The player (you)
    • getChannel

      @NotNull public static @NotNull Optional<@NotNull OfflinePlayer> getChannel(@NotNull @NotNull Player player)
      Get DM channel recipient
      Parameters:
      player - The player
    • hasChannel

      public static boolean hasChannel(@NotNull @NotNull Player player, @NotNull @NotNull OfflinePlayer recipient)
      Check whether player has DM channel with recipient
      Parameters:
      player - The player
      recipient - The recipient
    • hasChannel

      public static boolean hasChannel(@NotNull @NotNull Player player)
      Check whether player has DM channel
      Parameters:
      player - The player
    • createTeamChannel

      public static void createTeamChannel(@NotNull @NotNull Player player)
      Team message channel
      Parameters:
      player - The player
    • exitTeamChannel

      public static void exitTeamChannel(@NotNull @NotNull Player player)
      Exit team message channel
      Parameters:
      player - The player
    • hasTeamChannel

      public static boolean hasTeamChannel(@NotNull @NotNull Player player)
      Check whether player has a team message channel
      Parameters:
      player - The player