Fixes #748
Fixes #759
This commit is contained in:
Jesse Boyd
2015-11-28 22:46:10 +11:00
parent 7db30590c6
commit 94b0fbb266
23 changed files with 445 additions and 140 deletions

View File

@ -84,6 +84,10 @@ public class Location implements Cloneable, Comparable<Location> {
public Plot getPlot() {
return MainUtil.getPlot(this);
}
public ChunkLoc getChunkLoc() {
return new ChunkLoc(x >> 4, z >> 4);
}
public void setWorld(final String world) {

View File

@ -416,7 +416,6 @@ public class Plot {
* The cached origin plot<br>
* - The origin plot is used for plot grouping and relational data
*/
private Plot origin;
private Plot origin;
/**
@ -721,7 +720,7 @@ public class Plot {
* Get the average rating of the plot. This is the value displayed in /plot info
* @return average rating as double
*/
public double getAverageRating() {
public double getAverageRating() {
double sum = 0;
final Collection<Rating> ratings = getRatings().values();
for (final Rating rating : ratings) {

View File

@ -237,9 +237,9 @@ public class PlotHandler {
return false;
}
for (Plot current : MainUtil.getConnectedPlots(plot)) {
current.settings = null;
PS.get().removePlot(current.world, current.id, true);
DBFunc.delete(current);
current.settings = null;
}
return true;
}

View File

@ -126,6 +126,10 @@ public abstract class PlotWorld {
return true;
}
public boolean isCompatible(PlotWorld plotworld) {
return equals(plotworld);
}
/**
* When a world is created, the following method will be called for each
*