Class CommentInbox
java.lang.Object
com.plotsquared.core.plot.comment.CommentInbox
- Direct Known Subclasses:
InboxOwner,InboxPublic,InboxReport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanaddComment(Plot plot, PlotComment comment)booleancanModify(Plot plot, PlotPlayer<?> player)booleancanRead(Plot plot, PlotPlayer<?> player)booleancanWrite(Plot plot, PlotPlayer<?> player)voidclearInbox(Plot plot)abstract booleangetComments(Plot plot, RunnableVal<List<PlotComment>> whenDone)
The `whenDone` parameter should be executed when it's done fetching the comments.voidremoveComment(Plot plot, PlotComment comment)abstract StringtoString()
-
Constructor Details
-
CommentInbox
public CommentInbox()
-
-
Method Details
-
toString
-
canRead
- Parameters:
plot- the plot's inbox to readplayer- the player trying to read the comment- Returns:
- the inbox, otherwise
falsefalse
-
canWrite
- Parameters:
plot- the plot's inbox to write toplayer- the player trying to write the comment- Returns:
- true if the player can write a comment on the plot
-
canModify
- Parameters:
plot- the plot's inbox to write toplayer- the player trying to modify the inbox- Returns:
- true if the player can write a comment on the plot
-
getComments
The `whenDone` parameter should be executed when it's done fetching the comments. The value should be set to List of comments- Parameters:
plot- plotwhenDone- task to run when comments are obtained- Returns:
- success or not
-
addComment
- Parameters:
plot- plotcomment- the comment to add- Returns:
- success or not
-
removeComment
- Parameters:
plot- plotcomment- the comment to remove
-
clearInbox
- Parameters:
plot- plot
-