Class MailGUIManager

java.lang.Object
dev.unnm3d.redischat.mail.MailGUIManager

public class MailGUIManager extends Object
  • Constructor Details

    • MailGUIManager

      public MailGUIManager(RedisChat plugin)
  • Method Details

    • startEditorMode

      public void startEditorMode(@NotNull @NotNull org.bukkit.entity.Player sender, @NotNull @NotNull String target, @NotNull @NotNull String title, @NotNull @NotNull String token)
      Start the editor mode for the given player
      Parameters:
      sender - The player to start the editor mode
      target - The recipient of the mail
      title - The title of the mail
      token - The token to open the web editor
    • stopEditorMode

      public void stopEditorMode(@NotNull @NotNull org.bukkit.entity.Player sender, @NotNull @NotNull String content)
      Stop the editor mode for the given player Fills the mail with the given content
      Parameters:
      sender - The player to stop the editor mode
      content - The content of the mail
    • previewMail

      public void previewMail(org.bukkit.entity.Player sender)
      Preview the mail for the given player in the editor mode
      Parameters:
      sender - The player to preview the mail
    • confirmSendMail

      public void confirmSendMail(org.bukkit.entity.Player sender, boolean confirm)
      Confirm the mail for the given player in the editor mode Send the mail to the recipient
      Parameters:
      sender - The player to confirm the mail
      confirm - If the mail should be sent
    • sendMail

      public CompletionStage<Boolean> sendMail(@NotNull @NotNull Mail mail)
      Send mail to redis
      Parameters:
      mail - Mail to send
      Returns:
      CompletionStage if mail was sent successfully
    • deleteMail

      public CompletionStage<Boolean> deleteMail(@NotNull @NotNull Mail mail, @NotNull @NotNull org.bukkit.entity.Player deleter)
      Delete mail
      Parameters:
      mail - Mail to delete
      deleter - The player who deletes the mail
    • readMail

      public CompletionStage<Boolean> readMail(@NotNull @NotNull Mail mail, @NotNull @NotNull org.bukkit.entity.Player player, boolean read)
      Change the read status of the mail
      Parameters:
      mail - Mail to change the read status
      Returns:
      CompletionStage if mail read status was set successfully
    • getPublicMails

      public CompletableFuture<List<Mail>> getPublicMails(@NotNull @NotNull String playerName)
      Get all public mails with the given player read status
      Parameters:
      playerName - The player name to get read statuses
      Returns:
      CompletableFuture with all public mails
    • getPrivateMails

      public CompletableFuture<List<Mail>> getPrivateMails(@NotNull @NotNull String playerName)
      Get all private mails of the given player
      Parameters:
      playerName - The player name to get private mails
      Returns:
      CompletableFuture with all player private mails
    • openPublicMailGui

      public void openPublicMailGui(org.bukkit.entity.Player player)
      Open the public mail gui for the given player
      Parameters:
      player - The player to open the gui to
    • openPrivateMailGui

      public void openPrivateMailGui(org.bukkit.entity.Player player)
      Open the private mail gui for the given player
      Parameters:
      player - The player to open the gui to
    • openMailOptionsGui

      public void openMailOptionsGui(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull Mail mail)
      Open the mail options gui for the given player
      Parameters:
      player - The player to open the gui to
      mail - The mail to open the options to