mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Better UUID conversion
This commit is contained in:
parent
ea7926b0da
commit
e792a85c00
@ -217,7 +217,7 @@ public class DebugUUID extends SubCommand {
|
|||||||
|
|
||||||
MainUtil.sendConsoleMessage("&7 - Updating plot objects");
|
MainUtil.sendConsoleMessage("&7 - Updating plot objects");
|
||||||
|
|
||||||
for (Plot plot : PlotSquared.getPlots()) {
|
for (Plot plot : PlotSquared.getPlotsRaw()) {
|
||||||
UUID value = uCMap.get(plot.owner);
|
UUID value = uCMap.get(plot.owner);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
plot.owner = value;
|
plot.owner = value;
|
||||||
|
@ -94,10 +94,6 @@ public class MainUtil {
|
|||||||
myplot.settings.setMerged(new boolean[] { false, false, false, false });
|
myplot.settings.setMerged(new boolean[] { false, false, false, false });
|
||||||
DBFunc.setMerged(world, myplot, myplot.settings.getMerged());
|
DBFunc.setMerged(world, myplot, myplot.settings.getMerged());
|
||||||
}
|
}
|
||||||
if (plotworld.TYPE != 0 && plotworld.TERRAIN < 2) {
|
|
||||||
// FIXME unlink augmented
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (int x = pos1.x; x <= pos2.x; x++) {
|
for (int x = pos1.x; x <= pos2.x; x++) {
|
||||||
for (int y = pos1.y; y <= pos2.y; y++) {
|
for (int y = pos1.y; y <= pos2.y; y++) {
|
||||||
final boolean lx = x < pos2.x;
|
final boolean lx = x < pos2.x;
|
||||||
@ -115,7 +111,6 @@ public class MainUtil {
|
|||||||
MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);
|
MainUtil.setSign(UUIDHandler.getName(plot.owner), plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
manager.finishPlotUnlink(plotworld, ids);
|
manager.finishPlotUnlink(plotworld, ids);
|
||||||
for (final PlotId id : ids) {
|
for (final PlotId id : ids) {
|
||||||
final Plot myPlot = MainUtil.getPlot(world, id);
|
final Plot myPlot = MainUtil.getPlot(world, id);
|
||||||
@ -457,6 +452,50 @@ public class MainUtil {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void removeRoadSouthEast(PlotWorld plotworld, Plot plot) {
|
||||||
|
if (plotworld.TYPE != 0 && plotworld.TERRAIN > 1) {
|
||||||
|
PlotId id = plot.id;
|
||||||
|
PlotId id2 = new PlotId(id.x + 1, id.y + 1);
|
||||||
|
Location pos1 = getPlotTopLoc(plot.world, id).add(1, 0, 1);
|
||||||
|
Location pos2 = getPlotBottomLoc(plot.world, id2);
|
||||||
|
ChunkManager.manager.regenerateRegion(pos1, pos2, null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PlotSquared.getPlotManager(plot.world).removeRoadSouthEast(plotworld, plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void removeRoadEast(PlotWorld plotworld, Plot plot) {
|
||||||
|
if (plotworld.TYPE != 0 && plotworld.TERRAIN > 1) {
|
||||||
|
PlotId id = plot.id;
|
||||||
|
PlotId id2 = new PlotId(id.x + 1, id.y);
|
||||||
|
Location bot = getPlotBottomLocAbs(plot.world, id2);
|
||||||
|
Location top = getPlotTopLocAbs(plot.world, id);
|
||||||
|
Location pos1 = new Location(plot.world, top.getX() + 1, 0, bot.getZ() + 1);
|
||||||
|
Location pos2 = new Location(plot.world, bot.getX(), 0, top.getZ());
|
||||||
|
ChunkManager.manager.regenerateRegion(pos1, pos2, null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PlotSquared.getPlotManager(plot.world).removeRoadSouthEast(plotworld, plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void removeRoadSouth(PlotWorld plotworld, Plot plot) {
|
||||||
|
if (plotworld.TYPE != 0 && plotworld.TERRAIN > 1) {
|
||||||
|
PlotId id = plot.id;
|
||||||
|
PlotId id2 = new PlotId(id.x, id.y + 1);
|
||||||
|
Location bot = getPlotBottomLocAbs(plot.world, id2);
|
||||||
|
Location top = getPlotTopLocAbs(plot.world, id);
|
||||||
|
Location pos1 = new Location(plot.world, bot.getX() + 1, 0, top.getZ() + 1);
|
||||||
|
Location pos2 = new Location(plot.world, top.getX(), 0, bot.getZ());
|
||||||
|
ChunkManager.manager.regenerateRegion(pos1, pos2, null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
PlotSquared.getPlotManager(plot.world).removeRoadSouthEast(plotworld, plot);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merges 2 plots Removes the road inbetween <br> - Assumes the first plot parameter is lower <br> - Assumes neither
|
* Merges 2 plots Removes the road inbetween <br> - Assumes the first plot parameter is lower <br> - Assumes neither
|
||||||
* are a Mega-plot <br> - Assumes plots are directly next to each other <br> - Saves to DB
|
* are a Mega-plot <br> - Assumes plots are directly next to each other <br> - Saves to DB
|
||||||
|
Loading…
Reference in New Issue
Block a user