Class CommentInbox

java.lang.Object
com.plotsquared.core.plot.comment.CommentInbox
Direct Known Subclasses:
InboxOwner, InboxPublic, InboxReport

public abstract class CommentInbox extends Object
  • Constructor Details

  • Method Details

    • toString

      public abstract String toString()
      Overrides:
      toString in class Object
    • canRead

      public boolean canRead(Plot plot, PlotPlayer<?> player)
      Parameters:
      plot - the plot's inbox to read
      player - the player trying to read the comment
      Returns:
      the inbox, otherwise false false
    • canWrite

      public boolean canWrite(Plot plot, PlotPlayer<?> player)
      Parameters:
      plot - the plot's inbox to write to
      player - the player trying to write the comment
      Returns:
      true if the player can write a comment on the plot
    • canModify

      public boolean canModify(Plot plot, PlotPlayer<?> player)
      Parameters:
      plot - the plot's inbox to write to
      player - the player trying to modify the inbox
      Returns:
      true if the player can write a comment on the plot
    • getComments

      public abstract boolean getComments(Plot plot, RunnableVal<List<PlotComment>> whenDone)

      The `whenDone` parameter should be executed when it's done fetching the comments. The value should be set to List of comments
      Parameters:
      plot - plot
      whenDone - task to run when comments are obtained
      Returns:
      success or not
    • addComment

      public abstract boolean addComment(Plot plot, PlotComment comment)
      Parameters:
      plot - plot
      comment - the comment to add
      Returns:
      success or not
    • removeComment

      public void removeComment(Plot plot, PlotComment comment)
      Parameters:
      plot - plot
      comment - the comment to remove
    • clearInbox

      public void clearInbox(Plot plot)
      Parameters:
      plot - plot