mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-10 06:23:14 +00:00
Cleanup
This commit is contained in:
parent
c09c5b048e
commit
ec80151cd9
25 changed files with 417 additions and 371 deletions
|
@ -141,9 +141,9 @@ public class ClusterManager {
|
|||
public static PlotCluster getCluster(final Plot plot) {
|
||||
return getCluster(plot.world, plot.id);
|
||||
}
|
||||
|
||||
public static PlotCluster getCluster(final Location loc) {
|
||||
final String world = loc.getWorld();
|
||||
|
||||
public static PlotCluster getClusterAbs(final Location loc) {
|
||||
String world = loc.getWorld();
|
||||
if ((last != null) && last.world.equals(world)) {
|
||||
if (contains(last, loc)) {
|
||||
return last;
|
||||
|
@ -164,6 +164,16 @@ public class ClusterManager {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static PlotCluster getCluster(final Location loc) {
|
||||
final String world = loc.getWorld();
|
||||
PlotManager manager = PlotSquared.getPlotManager(world);
|
||||
PlotId id = manager.getPlotIdAbs(PlotSquared.getPlotWorld(world), loc.getX(), loc.getY(), loc.getZ());
|
||||
if (id != null) {
|
||||
return getCluster(world, id);
|
||||
}
|
||||
return getClusterAbs(loc);
|
||||
}
|
||||
|
||||
public static PlotCluster getCluster(final String world, final PlotId id) {
|
||||
if ((last != null) && last.world.equals(world)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue