From 462c113ce89851f4c3af0134c39cbabf46b75879 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Fri, 6 Sep 2019 21:20:54 -0400 Subject: [PATCH] Fixed accidental code reversion --- .../plotsquared/plot/commands/Inbox.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 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 c0c898205..180bec623 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 @@ -148,8 +148,15 @@ import java.util.List; } PlotComment comment = value.get(index - 1); inbox.removeComment(plot, comment); - plot.removeComment(comment); - MainUtil.sendMessage(player, Captions.COMMENT_REMOVED, comment.comment); + boolean success = plot.removeComment(comment); + if (success) { + MainUtil.sendMessage(player, Captions.COMMENT_REMOVED_SUCCESS, + comment.comment); + } else { + MainUtil.sendMessage(player, Captions.COMMENT_REMOVED_FAILURE, + comment.comment); + + } } })) { sendMessage(player, Captions.NOT_IN_PLOT); @@ -165,13 +172,14 @@ import java.util.List; if (!comments.isEmpty()) { plot.removeComments(comments); } - MainUtil.sendMessage(player, Captions.COMMENT_REMOVED, "*"); + MainUtil.sendMessage(player, Captions.COMMENT_REMOVED_SUCCESS, "*"); return true; default: try { page = Integer.parseInt(args[1]); } catch (NumberFormatException ignored) { - sendMessage(player, Captions.COMMAND_SYNTAX, getUsage()); + sendMessage(player, Captions.COMMAND_SYNTAX, + "/plot inbox [inbox] [delete |clear|page]"); return false; } }