Fixed plot auto algorithms and

also made some performance improvements
This commit is contained in:
boy0001 2014-10-29 17:18:17 +11:00
parent 13a2d4234b
commit f60bac0e0e
5 changed files with 83 additions and 33 deletions

View file

@ -9,6 +9,7 @@
package com.intellectualcrafters.plot;
import com.intellectualcrafters.plot.Logger.LogLevel;
import com.intellectualcrafters.plot.commands.Auto;
import com.intellectualcrafters.plot.commands.MainCommand;
import com.intellectualcrafters.plot.database.*;
import com.intellectualcrafters.plot.events.PlayerTeleportToPlotEvent;
@ -475,6 +476,9 @@ public class PlotMain extends JavaPlugin {
PlotHelper.removeSign(worldobj, plot);
DBFunc.delete(world, plot);
removePlot(world, plot.id, true);
if (Math.abs(plot.id.x)<Math.abs(Auto.lastPlot.x) && Math.abs(plot.id.y)<Math.abs(Auto.lastPlot.y)) {
Auto.lastPlot = plot.id;
}
}
}
}