Migrated remaining Optionals

This commit is contained in:
matt 2019-01-02 23:15:42 -05:00
parent c7b9bfeb4b
commit e12a7bb85f
4 changed files with 4 additions and 5 deletions

View File

@ -10,10 +10,10 @@ import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment;
import com.github.intellectualsites.plotsquared.plot.util.CommentManager;
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
import com.github.intellectualsites.plotsquared.plot.util.StringMan;
import com.google.common.base.Optional;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
@CommandDeclaration(command = "inbox", description = "Review the comments for a plot",
usage = "/plot inbox [inbox] [delete <index>|clear|page]", permission = "plots.inbox",

View File

@ -3,7 +3,6 @@ package com.github.intellectualsites.plotsquared.plot.object;
import com.github.intellectualsites.plotsquared.plot.flag.Flag;
import com.github.intellectualsites.plotsquared.plot.flag.Flags;
import com.github.intellectualsites.plotsquared.plot.object.comment.PlotComment;
import com.google.common.base.Optional;
import java.util.*;
@ -146,7 +145,7 @@ public class PlotSettings {
public Optional<ArrayList<PlotComment>> getComments(String inbox) {
ArrayList<PlotComment> c = new ArrayList<>();
if (this.comments == null) {
return Optional.absent();
return Optional.empty();
}
for (PlotComment comment : this.comments) {
if (comment.inbox.equals(inbox)) {

View File

@ -4,10 +4,10 @@ import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
import com.google.common.base.Optional;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
public class InboxOwner extends CommentInbox {

View File

@ -4,10 +4,10 @@ import com.github.intellectualsites.plotsquared.plot.database.DBFunc;
import com.github.intellectualsites.plotsquared.plot.object.Plot;
import com.github.intellectualsites.plotsquared.plot.object.RunnableVal;
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
import com.google.common.base.Optional;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
public class InboxPublic extends CommentInbox {