mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Here you go.
This commit is contained in:
parent
dfc32741fa
commit
4e321d2b27
@ -111,6 +111,11 @@ public class Merge extends SubCommand {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (args[0].equalsIgnoreCase("all")) {
|
||||
plot.autoMerge(args.length != 2 || !args[1].equalsIgnoreCase("false"));
|
||||
MainUtil.sendMessage(plr, C.SUCCESS_MERGE);
|
||||
return true;
|
||||
}
|
||||
for (int i = 0; i < values.length; i++) {
|
||||
if (args[0].equalsIgnoreCase(values[i]) || args[0].equalsIgnoreCase(aliases[i])) {
|
||||
direction = i;
|
||||
|
@ -56,11 +56,10 @@ public class Unlink extends SubCommand {
|
||||
if (MainUtil.getTopPlot(plot).equals(MainUtil.getBottomPlot(plot))) {
|
||||
return sendMessage(plr, C.UNLINK_IMPOSSIBLE);
|
||||
}
|
||||
|
||||
Runnable runnable = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (!MainUtil.unlinkPlot(plot)) {
|
||||
if (!MainUtil.unlinkPlot(plot, true)) {
|
||||
MainUtil.sendMessage(plr, "&cUnlink has been cancelled");
|
||||
return;
|
||||
}
|
||||
|
@ -595,11 +595,11 @@ public class Plot {
|
||||
|
||||
/**
|
||||
* Unlink a plot and remove the roads
|
||||
* @see MainUtil#unlinkPlot(Plot)
|
||||
* @see MainUtil#unlinkPlot(Plot, boolean removeRoad)
|
||||
* @return true if plot was linked
|
||||
*/
|
||||
public boolean unlink() {
|
||||
return MainUtil.unlinkPlot(this);
|
||||
return MainUtil.unlinkPlot(this, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -130,7 +130,7 @@ public class ExpireManager {
|
||||
}
|
||||
}
|
||||
if (plot.isMerged()) {
|
||||
MainUtil.unlinkPlot(plot);
|
||||
MainUtil.unlinkPlot(plot, true);
|
||||
}
|
||||
plot.deletePlot(null);
|
||||
expiredPlots.get(world).remove(plot);
|
||||
|
@ -298,7 +298,7 @@ public class MainUtil {
|
||||
return MainUtil.mergePlots(world, plotIds, true, true);
|
||||
}
|
||||
|
||||
public static boolean unlinkPlot(final Plot plot) {
|
||||
public static boolean unlinkPlot(final Plot plot, boolean createRoad) {
|
||||
final String world = plot.world;
|
||||
final PlotId pos1 = MainUtil.getBottomPlot(plot).id;
|
||||
final PlotId pos2 = MainUtil.getTopPlot(plot).id;
|
||||
@ -324,7 +324,7 @@ public class MainUtil {
|
||||
myplot.getSettings().setMerged(new boolean[] { false, false, false, false });
|
||||
DBFunc.setMerged(myplot, myplot.getSettings().getMerged());
|
||||
}
|
||||
if (plotworld.TERRAIN != 3) {
|
||||
if (plotworld.TERRAIN != 3 && createRoad) {
|
||||
for (int x = pos1.x; x <= pos2.x; x++) {
|
||||
for (int y = pos1.y; y <= pos2.y; y++) {
|
||||
final boolean lx = x < pos2.x;
|
||||
|
@ -53,7 +53,6 @@ public class Permissions {
|
||||
if (player.hasPermission(stub + ".*")) {
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
System.out.print(range);
|
||||
for (int i = range; i > 0; i--) {
|
||||
if (player.hasPermission(stub + "." + i)) {
|
||||
return i;
|
||||
|
@ -81,7 +81,6 @@ public class BukkitPlayer extends PlotPlayer {
|
||||
return EconHandler.manager.hasPermission(getName(), node);
|
||||
}
|
||||
boolean value = this.player.hasPermission(node);
|
||||
System.out.print(value + " | " + node);
|
||||
if (Settings.PERMISSION_CACHING) {
|
||||
if (value) {
|
||||
this.hasPerm.add(node);
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user