mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Small tweaks
Signed-off-by: matt <4009945+MattBDev@users.noreply.github.com>
This commit is contained in:
parent
9101cb9218
commit
3d8179a4e6
@ -11,9 +11,7 @@ import com.github.intellectualsites.plotsquared.plot.util.*;
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@CommandDeclaration(command = "auto", permission = "plots.auto",
|
@CommandDeclaration(command = "auto", permission = "plots.auto", category = CommandCategory.CLAIMING, requiredType = RequiredType.NONE, description = "Claim the nearest plot", aliases = "a", usage = "/plot auto [length,width]")
|
||||||
category = CommandCategory.CLAIMING, requiredType = RequiredType.NONE,
|
|
||||||
description = "Claim the nearest plot", aliases = "a", usage = "/plot auto [length,width]")
|
|
||||||
public class Auto extends SubCommand {
|
public class Auto extends SubCommand {
|
||||||
|
|
||||||
@Deprecated public static PlotId getNextPlotId(PlotId id, int step) {
|
@Deprecated public static PlotId getNextPlotId(PlotId id, int step) {
|
||||||
|
@ -10,9 +10,7 @@ import com.github.intellectualsites.plotsquared.plot.util.EconHandler;
|
|||||||
import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
||||||
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
|
import com.github.intellectualsites.plotsquared.plot.util.TaskManager;
|
||||||
|
|
||||||
@CommandDeclaration(command = "claim", aliases = "c",
|
@CommandDeclaration(command = "claim", aliases = "c", description = "Claim the current plot you're standing on", category = CommandCategory.CLAIMING, requiredType = RequiredType.NONE, permission = "plots.claim", usage = "/plot claim")
|
||||||
description = "Claim the current plot you're standing on", category = CommandCategory.CLAIMING,
|
|
||||||
requiredType = RequiredType.NONE, permission = "plots.claim", usage = "/plot claim")
|
|
||||||
public class Claim extends SubCommand {
|
public class Claim extends SubCommand {
|
||||||
|
|
||||||
@Override public boolean onCommand(final PlotPlayer player, String[] args) {
|
@Override public boolean onCommand(final PlotPlayer player, String[] args) {
|
||||||
@ -82,22 +80,14 @@ public class Claim extends SubCommand {
|
|||||||
if (plot.canClaim(player)) {
|
if (plot.canClaim(player)) {
|
||||||
plot.owner = player.getUUID();
|
plot.owner = player.getUUID();
|
||||||
final String finalSchematic = schematic;
|
final String finalSchematic = schematic;
|
||||||
DBFunc.createPlotSafe(plot, new Runnable() {
|
DBFunc.createPlotSafe(plot, () -> TaskManager.IMP.sync(new RunnableVal<Object>() {
|
||||||
@Override public void run() {
|
@Override public void run(Object value) {
|
||||||
TaskManager.IMP.sync(new RunnableVal<Object>() {
|
plot.claim(player, true, finalSchematic, false);
|
||||||
@Override public void run(Object value) {
|
if (area.AUTO_MERGE) {
|
||||||
plot.claim(player, true, finalSchematic, false);
|
plot.autoMerge(-1, Integer.MAX_VALUE, player.getUUID(), true);
|
||||||
if (area.AUTO_MERGE) {
|
}
|
||||||
plot.autoMerge(-1, Integer.MAX_VALUE, player.getUUID(), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}, new Runnable() {
|
}), () -> sendMessage(player, C.PLOT_NOT_CLAIMED));
|
||||||
@Override public void run() {
|
|
||||||
sendMessage(player, C.PLOT_NOT_CLAIMED);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
sendMessage(player, C.PLOT_NOT_CLAIMED);
|
sendMessage(player, C.PLOT_NOT_CLAIMED);
|
||||||
|
Loading…
Reference in New Issue
Block a user