Class CommentInbox
java.lang.Object
com.plotsquared.core.plot.comment.CommentInbox
- Direct Known Subclasses:
InboxOwner
,InboxPublic
,InboxReport
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
addComment
(Plot plot, PlotComment comment) boolean
canModify
(Plot plot, PlotPlayer<?> player) boolean
canRead
(Plot plot, PlotPlayer<?> player) boolean
canWrite
(Plot plot, PlotPlayer<?> player) void
clearInbox
(Plot plot) abstract boolean
getComments
(Plot plot, RunnableVal<List<PlotComment>> whenDone)
The `whenDone` parameter should be executed when it's done fetching the comments.void
removeComment
(Plot plot, PlotComment comment) abstract String
toString()
-
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
false
false
-
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
-