Send message when attempting to leave an own plot

This is a temporary workaround for the todo addressed below.
This commit is contained in:
N0tMyFaultOG 2020-11-19 17:30:26 +01:00
parent aedf402c17
commit f6ff843cfb
2 changed files with 2 additions and 1 deletions

View File

@ -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();

View File

@ -445,6 +445,7 @@
"member.removed_players": "<prefix><gray>Removed <amount> player(s) from this plot.</gray>",
"member.plot_left": "<prefix><gray><player> left the plot.</gray>",
"member.plot_cant_leave_owner": "<prefix><red>You are this plot owner. You cannot leave the plot.</red>",
"member.already_owner": "<prefix><gray><player></gray><gold> is already the plot owner.</gold>",
"member.already_added": "<prefix><gray>That user is already added to that category: <player></gray>",
"member.member_added": "<prefix><dark_aqua>That user can now build while the plot owner is online.</dark_aqua>",