mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
Remove deprecated methods without internal use.
This commit is contained in:
@ -606,6 +606,7 @@ public class PS {
|
||||
* {@link #sortPlots(Collection, SortType, PlotArea)} which has
|
||||
* additional checks before calling this
|
||||
*/
|
||||
// TODO: Re-evaluate deprecation of this, as it's being used internally
|
||||
@Deprecated public ArrayList<Plot> sortPlotsByHash(Collection<Plot> plots) {
|
||||
int hardmax = 256000;
|
||||
int max = 0;
|
||||
@ -658,6 +659,7 @@ public class PS {
|
||||
*
|
||||
* @param input an array of plots to sort
|
||||
*/
|
||||
// TODO: Re-evaluate deprecation of this, as it's being used internally
|
||||
@Deprecated public void sortPlotsByHash(Plot[] input) {
|
||||
List<Plot>[] bucket = new ArrayList[32];
|
||||
for (int i = 0; i < bucket.length; i++) {
|
||||
@ -685,6 +687,7 @@ public class PS {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Re-evaluate deprecation of this, as it's being used internally
|
||||
@Deprecated public ArrayList<Plot> sortPlotsByTimestamp(Collection<Plot> plots) {
|
||||
int hardMax = 256000;
|
||||
int max = 0;
|
||||
@ -739,6 +742,7 @@ public class PS {
|
||||
* @return
|
||||
* @deprecated Unchecked, use {@link #sortPlots(Collection, SortType, PlotArea)} instead which will call this after checks
|
||||
*/
|
||||
// TODO: Re-evaluate deprecation of this, as it's being used internally
|
||||
@Deprecated public List<Plot> sortPlotsByModified(Collection<Plot> input) {
|
||||
List<Plot> list;
|
||||
if (input instanceof List) {
|
||||
@ -976,18 +980,6 @@ public class PS {
|
||||
return new HashSet<>(myplots);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use {@link #hasPlotArea(String)}.
|
||||
* Note: Worlds may have more than one plot area
|
||||
*
|
||||
* @param world the world
|
||||
* @return if the world is a plotworld
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated public boolean isPlotWorld(String world) {
|
||||
return hasPlotArea(world);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a plot world.
|
||||
*
|
||||
@ -1880,21 +1872,6 @@ public class PS {
|
||||
return set;
|
||||
}
|
||||
|
||||
/**
|
||||
* Not recommended for use since worlds can have multiple PlotAreas.
|
||||
*
|
||||
* @return Set of world names
|
||||
*/
|
||||
@Deprecated public Set<String> getPlotWorldStrings() {
|
||||
HashSet<String> set = new HashSet<>(manager.getAllPlotAreas().length);
|
||||
for (String world : manager.getAllWorlds()) {
|
||||
if (manager.getPlotAreas(world, null).length != 0) {
|
||||
set.add(world);
|
||||
}
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
||||
public boolean isAugmented(String world) {
|
||||
PlotArea[] areas = manager.getPlotAreas(world, null);
|
||||
if (areas == null) {
|
||||
|
@ -55,30 +55,6 @@ public class Auto extends SubCommand {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the next plot id (spiral out from 0,0)
|
||||
*
|
||||
* @param start
|
||||
* @return
|
||||
*/
|
||||
@Deprecated public static PlotId getNextPlot(PlotId start) {
|
||||
int plots;
|
||||
PlotId center;
|
||||
center = new PlotId(0, 0);
|
||||
plots = Integer.MAX_VALUE;
|
||||
PlotId currentId;
|
||||
for (int i = 0; i < plots; i++) {
|
||||
if (start == null) {
|
||||
start = new PlotId(0, 0);
|
||||
} else {
|
||||
start = start.getNextId(1);
|
||||
}
|
||||
currentId = new PlotId(center.x + start.x, center.y + start.y);
|
||||
return currentId;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Teleport the player home, or claim a new plot
|
||||
*
|
||||
|
@ -1639,39 +1639,11 @@ public class Plot {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the top and bottom plot id.<br>
|
||||
* - If the plot is not connected, it will return itself for the top/bottom<br>
|
||||
* - the returned ids will not necessarily correspond to claimed plots if the connected plots do not form a rectangular shape
|
||||
*
|
||||
* @return new Plot[] { bottom, top }
|
||||
* @deprecated as merged plots no longer need to be rectangular
|
||||
*/
|
||||
@Deprecated public PlotId[] getCornerIds() {
|
||||
if (!this.isMerged()) {
|
||||
return new PlotId[] {this.getId(), this.getId()};
|
||||
}
|
||||
PlotId min = new PlotId(this.getId().x, this.getId().y);
|
||||
PlotId max = new PlotId(this.getId().x, this.getId().y);
|
||||
for (Plot current : this.getConnectedPlots()) {
|
||||
if (current.getId().x < min.x) {
|
||||
min.x = current.getId().x;
|
||||
} else if (current.getId().x > max.x) {
|
||||
max.x = current.getId().x;
|
||||
}
|
||||
if (current.getId().y < min.y) {
|
||||
min.y = current.getId().y;
|
||||
} else if (current.getId().y > max.y) {
|
||||
max.y = current.getId().y;
|
||||
}
|
||||
}
|
||||
return new PlotId[] {min, max};
|
||||
}
|
||||
|
||||
/**
|
||||
* @return
|
||||
* @deprecated in favor of getCorners()[0];<br>
|
||||
*/
|
||||
// Won't remove as suggestion also points to deprecated method
|
||||
@Deprecated public Location getBottom() {
|
||||
return this.getCorners()[0];
|
||||
}
|
||||
@ -1680,6 +1652,7 @@ public class Plot {
|
||||
* @return the top corner of the plot
|
||||
* @deprecated in favor of getCorners()[1];
|
||||
*/
|
||||
// Won't remove as suggestion also points to deprecated method
|
||||
@Deprecated public Location getTop() {
|
||||
return this.getCorners()[1];
|
||||
}
|
||||
|
@ -300,10 +300,6 @@ public abstract class PlotPlayer implements CommandCaller, OfflinePlotPlayer {
|
||||
|
||||
////////////////////////////////////////////////
|
||||
|
||||
@Deprecated public long getPreviousLogin() {
|
||||
return getLastPlayed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get this player's full location (including yaw/pitch)
|
||||
*
|
||||
|
@ -43,19 +43,6 @@ public class MainUtil {
|
||||
public static short[][][] CACHE_I = null;
|
||||
public static short[][][] CACHE_J = null;
|
||||
|
||||
/**
|
||||
* @param location
|
||||
* @return
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated public static PlotId getPlotId(Location location) {
|
||||
PlotArea area = location.getPlotArea();
|
||||
return area == null ?
|
||||
null :
|
||||
area.getPlotManager()
|
||||
.getPlotId(area, location.getX(), location.getY(), location.getZ());
|
||||
}
|
||||
|
||||
/**
|
||||
* This cache is used for world generation and just saves a bit of calculation time when checking if something is in the plot area.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user