mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fixes #3018
This commit is contained in:
parent
331a6ea1b3
commit
7f3d3ecb00
@ -61,10 +61,8 @@ public class Leave extends Command {
|
|||||||
) throws CommandException {
|
) throws CommandException {
|
||||||
final Plot plot = check(player.getCurrentPlot(), TranslatableCaption.of("errors.not_in_plot"));
|
final Plot plot = check(player.getCurrentPlot(), TranslatableCaption.of("errors.not_in_plot"));
|
||||||
checkTrue(plot.hasOwner(), TranslatableCaption.of("info.plot_unowned"));
|
checkTrue(plot.hasOwner(), TranslatableCaption.of("info.plot_unowned"));
|
||||||
checkTrue(plot.isAdded(player.getUUID()), TranslatableCaption.of("members.not_added_trusted"));
|
|
||||||
if (plot.isOwner(player.getUUID())) {
|
if (plot.isOwner(player.getUUID())) {
|
||||||
player.sendMessage(TranslatableCaption.of("member.plot_cant_leave_owner"));
|
player.sendMessage(TranslatableCaption.of("member.plot_cant_leave_owner"));
|
||||||
// TODO setowner, other
|
|
||||||
} else {
|
} else {
|
||||||
UUID uuid = player.getUUID();
|
UUID uuid = player.getUUID();
|
||||||
if (plot.isAdded(uuid)) {
|
if (plot.isAdded(uuid)) {
|
||||||
@ -80,8 +78,7 @@ public class Leave extends Command {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
TranslatableCaption.of("errors.invalid_player"),
|
TranslatableCaption.of("members.not_added_trusted")
|
||||||
Template.of("value", String.valueOf(1))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user