From f6ff843cfb33442e42bb627f8102b3db07b39199 Mon Sep 17 00:00:00 2001 From: N0tMyFaultOG Date: Thu, 19 Nov 2020 17:30:26 +0100 Subject: [PATCH] Send message when attempting to leave an own plot This is a temporary workaround for the todo addressed below. --- Core/src/main/java/com/plotsquared/core/command/Leave.java | 2 +- Core/src/main/resources/lang/messages_en.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/src/main/java/com/plotsquared/core/command/Leave.java b/Core/src/main/java/com/plotsquared/core/command/Leave.java index c531e6603..58c745e9f 100644 --- a/Core/src/main/java/com/plotsquared/core/command/Leave.java +++ b/Core/src/main/java/com/plotsquared/core/command/Leave.java @@ -60,7 +60,7 @@ public class Leave extends Command { checkTrue(plot.hasOwner(), TranslatableCaption.of("info.plot_unowned")); checkTrue(plot.isAdded(player.getUUID()), TranslatableCaption.of("members.not_added_trusted")); if (plot.isOwner(player.getUUID())) { - checkTrue(plot.hasOwner(), TranslatableCaption.of("member.already_owner")); + player.sendMessage(TranslatableCaption.of("member.plot_cant_leave_owner")); // TODO setowner, other } else { UUID uuid = player.getUUID(); diff --git a/Core/src/main/resources/lang/messages_en.json b/Core/src/main/resources/lang/messages_en.json index a2bd1806f..81760e176 100644 --- a/Core/src/main/resources/lang/messages_en.json +++ b/Core/src/main/resources/lang/messages_en.json @@ -445,6 +445,7 @@ "member.removed_players": "Removed player(s) from this plot.", "member.plot_left": " left the plot.", + "member.plot_cant_leave_owner": "You are this plot owner. You cannot leave the plot.", "member.already_owner": " is already the plot owner.", "member.already_added": "That user is already added to that category: ", "member.member_added": "That user can now build while the plot owner is online.",