mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-09 14:03:22 +00:00
Abstract PlotMe connector
This commit is contained in:
parent
3540e1f6ca
commit
454772fd27
5 changed files with 187 additions and 128 deletions
|
@ -94,22 +94,26 @@ public class MainUtil {
|
|||
myplot.settings.setMerged(new boolean[] { false, false, false, false });
|
||||
DBFunc.setMerged(world, myplot, myplot.settings.getMerged());
|
||||
}
|
||||
// FIXME unlink augmented
|
||||
for (int x = pos1.x; x <= pos2.x; x++) {
|
||||
for (int y = pos1.y; y <= pos2.y; y++) {
|
||||
final boolean lx = x < pos2.x;
|
||||
final boolean ly = y < pos2.y;
|
||||
final Plot p = MainUtil.getPlot(world, new PlotId(x, y));
|
||||
if (lx) {
|
||||
manager.createRoadEast(plotworld, p);
|
||||
if (ly) {
|
||||
manager.createRoadSouthEast(plotworld, p);
|
||||
if (plotworld.TYPE != 0 && plotworld.TERRAIN < 2) {
|
||||
// FIXME unlink augmented
|
||||
}
|
||||
else {
|
||||
for (int x = pos1.x; x <= pos2.x; x++) {
|
||||
for (int y = pos1.y; y <= pos2.y; y++) {
|
||||
final boolean lx = x < pos2.x;
|
||||
final boolean ly = y < pos2.y;
|
||||
final Plot p = MainUtil.getPlot(world, new PlotId(x, y));
|
||||
if (lx) {
|
||||
manager.createRoadEast(plotworld, p);
|
||||
if (ly) {
|
||||
manager.createRoadSouthEast(plotworld, p);
|
||||
}
|
||||
}
|
||||
if (ly) {
|
||||
manager.createRoadSouth(plotworld, p);
|
||||
}
|
||||
MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);
|
||||
}
|
||||
if (ly) {
|
||||
manager.createRoadSouth(plotworld, p);
|
||||
}
|
||||
MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);
|
||||
}
|
||||
}
|
||||
manager.finishPlotUnlink(plotworld, ids);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue