mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-07 04:53:00 +00:00
it's faster now
This commit is contained in:
parent
0bb4afbd9a
commit
643d907792
4 changed files with 46 additions and 36 deletions
|
@ -34,15 +34,11 @@ import org.bukkit.block.Skull;
|
|||
import org.bukkit.block.banner.Pattern;
|
||||
import org.bukkit.block.banner.PatternType;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotMain;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.generator.HybridPlotManager;
|
||||
import com.intellectualcrafters.plot.object.BlockLoc;
|
||||
import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
|
@ -57,6 +53,12 @@ public class ChunkManager {
|
|||
public static MutableInt index = new MutableInt(0);
|
||||
public static HashMap<Integer, Integer> tasks = new HashMap<>();
|
||||
|
||||
public static ChunkLoc getChunkChunk(Location loc) {
|
||||
int x = loc.getBlockX() >> 9;
|
||||
int z = loc.getBlockZ() >> 9;
|
||||
return new ChunkLoc(x, z);
|
||||
}
|
||||
|
||||
public static ArrayList<ChunkLoc> getChunkChunks(World world) {
|
||||
File[] regionFiles = new File(world.getName() + File.separator + "region").listFiles();
|
||||
ArrayList<ChunkLoc> chunks = new ArrayList<>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue