mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +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",
|
@CommandDeclaration(command = "leave",
|
||||||
description = "Removes self from being trusted or a member of the plot",
|
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 {
|
requiredType = RequiredType.PLAYER) public class Leave extends Command {
|
||||||
public Leave() {
|
public Leave() {
|
||||||
super(MainCommand.getInstance(), true);
|
super(MainCommand.getInstance(), true);
|
||||||
@ -26,7 +26,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
RunnableVal2<Command, CommandResult> whenDone) throws CommandException {
|
RunnableVal2<Command, CommandResult> whenDone) throws CommandException {
|
||||||
final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT);
|
final Plot plot = check(player.getCurrentPlot(), Captions.NOT_IN_PLOT);
|
||||||
checkTrue(plot.hasOwner(), Captions.PLOT_UNOWNED);
|
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());
|
checkTrue(args.length == 0, Captions.COMMAND_SYNTAX, getUsage());
|
||||||
if (plot.isOwner(player.getUUID())) {
|
if (plot.isOwner(player.getUUID())) {
|
||||||
checkTrue(plot.hasOwner(), Captions.ALREADY_OWNER);
|
checkTrue(plot.hasOwner(), Captions.ALREADY_OWNER);
|
||||||
@ -40,9 +40,9 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
if (plot.removeMember(uuid)) {
|
if (plot.removeMember(uuid)) {
|
||||||
EventUtil.manager.callMember(player, plot, uuid, false);
|
EventUtil.manager.callMember(player, plot, uuid, false);
|
||||||
}
|
}
|
||||||
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, player.getName());
|
MainUtil.sendMessage(player, Captions.PLOT_LEFT, player.getName());
|
||||||
} else {
|
} else {
|
||||||
MainUtil.sendMessage(player, Captions.REMOVED_PLAYERS, 1);
|
MainUtil.sendMessage(player, Captions.INVALID_PLAYER, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CompletableFuture.completedFuture(true);
|
return CompletableFuture.completedFuture(true);
|
||||||
|
@ -570,10 +570,12 @@ public enum Captions {
|
|||||||
//</editor-fold>
|
//</editor-fold>
|
||||||
//<editor-fold desc="Member">
|
//<editor-fold desc="Member">
|
||||||
REMOVED_PLAYERS("$2Removed %s players from this plot.", "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_OWNER("$2That user is already the plot owner: %s0", "Member"),
|
||||||
ALREADY_ADDED("$2That user is already added to that category: %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"),
|
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"),
|
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>
|
||||||
//<editor-fold desc="Set Owner">
|
//<editor-fold desc="Set Owner">
|
||||||
SET_OWNER("$4You successfully set the plot owner", "Owner"),
|
SET_OWNER("$4You successfully set the plot owner", "Owner"),
|
||||||
|
Loading…
Reference in New Issue
Block a user