From e12a7bb85f08e622e872334388ae478316e5fb02 Mon Sep 17 00:00:00 2001 From: matt <4009945+MattBDev@users.noreply.github.com> Date: Wed, 2 Jan 2019 23:15:42 -0500 Subject: [PATCH] Migrated remaining Optionals --- .../intellectualsites/plotsquared/plot/commands/Inbox.java | 2 +- .../plotsquared/plot/object/PlotSettings.java | 3 +-- .../plotsquared/plot/object/comment/InboxOwner.java | 2 +- .../plotsquared/plot/object/comment/InboxPublic.java | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java index bf1bb74be..5c7cfc0ac 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/commands/Inbox.java @@ -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 |clear|page]", permission = "plots.inbox", diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java index 2eadd85ff..4f3701f56 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotSettings.java @@ -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> getComments(String inbox) { ArrayList c = new ArrayList<>(); if (this.comments == null) { - return Optional.absent(); + return Optional.empty(); } for (PlotComment comment : this.comments) { if (comment.inbox.equals(inbox)) { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java index d15f194ba..d3a80013e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxOwner.java @@ -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 { diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java index 2d94026f4..a14954e28 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/comment/InboxPublic.java @@ -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 {