mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Merge remote-tracking branch 'origin/breaking' into breaking
This commit is contained in:
commit
d8933afb50
@ -15,7 +15,7 @@ import java.util.concurrent.CompletableFuture;
|
||||
|
||||
@CommandDeclaration(command = "leave",
|
||||
description = "Removes self from being trusted or a member of the plot",
|
||||
permission = "plots.leave", category = CommandCategory.CLAIMING,
|
||||
permission = "plots.leave", usage = "/plot leave", category = CommandCategory.CLAIMING,
|
||||
requiredType = RequiredType.PLAYER) public class Leave extends Command {
|
||||
public Leave() {
|
||||
super(MainCommand.getInstance(), true);
|
||||
@ -26,7 +26,7 @@ import java.util.concurrent.CompletableFuture;
|
||||
RunnableVal2<Command, CommandResult> whenDone) throws CommandException {
|
||||
final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT);
|
||||
checkTrue(plot.hasOwner(), Captions.PLOT_UNOWNED);
|
||||
checkTrue(plot.isAdded(player.getUUID()), Captions.NO_PLOT_PERMS);
|
||||
checkTrue(plot.isAdded(player.getUUID()), Captions.NOT_ADDED_TRUSTED);
|
||||
checkTrue(args.length == 0, Captions.COMMAND_SYNTAX, getUsage());
|
||||
if (plot.isOwner(player.getUUID())) {
|
||||
checkTrue(plot.hasOwner(), Captions.ALREADY_OWNER);
|
||||
@ -40,9 +40,9 @@ import java.util.concurrent.CompletableFuture;
|
||||
if (plot.removeMember(uuid)) {
|
||||
EventUtil.manager.callMember(player, plot, uuid, false);
|
||||
}
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, player.getName());
|
||||
MainUtil.sendMessage(player, Captions.PLOT_LEFT, player.getName());
|
||||
} else {
|
||||
MainUtil.sendMessage(player, Captions.REMOVED_PLAYERS, 1);
|
||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, 1);
|
||||
}
|
||||
}
|
||||
return CompletableFuture.completedFuture(true);
|
||||
|
@ -570,10 +570,12 @@ public enum Captions {
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Member">
|
||||
REMOVED_PLAYERS("$2Removed %s players from this plot.", "Member"),
|
||||
PLOT_LEFT("$2%s left the plot.", "Member"),
|
||||
ALREADY_OWNER("$2That user is already the plot owner: %s0", "Member"),
|
||||
ALREADY_ADDED("$2That user is already added to that category: %s0", "Member"),
|
||||
MEMBER_ADDED("$4That user can now build while the plot owner is online", "Member"),
|
||||
PLOT_MAX_MEMBERS("$2You are not allowed to add any more players to this plot", "Member"),
|
||||
NOT_ADDED_TRUSTED("$2You must be added or trusted to the plot to run that command", "Member"),
|
||||
//</editor-fold>
|
||||
//<editor-fold desc="Set Owner">
|
||||
SET_OWNER("$4You successfully set the plot owner", "Owner"),
|
||||
|
Loading…
Reference in New Issue
Block a user