mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2024-12-23 00:15:06 +00:00
Revert broken async chunk change
This commit is contained in:
parent
f06903f1b8
commit
392ef51a6f
1 changed files with 1 additions and 10 deletions
|
@ -10,7 +10,6 @@ import com.github.intellectualsites.plotsquared.plot.util.block.BasicLocalBlockQ
|
||||||
import com.sk89q.jnbt.CompoundTag;
|
import com.sk89q.jnbt.CompoundTag;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
import io.papermc.lib.PaperLib;
|
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
|
@ -76,20 +75,12 @@ public class BukkitLocalQueue extends BasicLocalBlockQueue {
|
||||||
setBaseBlocks(lc);
|
setBaseBlocks(lc);
|
||||||
}
|
}
|
||||||
|
|
||||||
public World getBukkitWorld() {
|
|
||||||
return Bukkit.getWorld(getWorld());
|
|
||||||
}
|
|
||||||
|
|
||||||
public Chunk getChunk(int x, int z) throws ExecutionException, InterruptedException {
|
|
||||||
return PaperLib.getChunkAtAsync(getBukkitWorld(), x, z).get();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setBaseBlocks(LocalChunk lc) throws ExecutionException, InterruptedException {
|
public void setBaseBlocks(LocalChunk lc) throws ExecutionException, InterruptedException {
|
||||||
World worldObj = Bukkit.getWorld(getWorld());
|
World worldObj = Bukkit.getWorld(getWorld());
|
||||||
if (worldObj == null) {
|
if (worldObj == null) {
|
||||||
throw new NullPointerException("World cannot be null.");
|
throw new NullPointerException("World cannot be null.");
|
||||||
}
|
}
|
||||||
PaperLib.getChunkAtAsync(worldObj, lc.getX(), lc.getZ(), true).get();
|
//PaperLib.getChunkAtAsync(worldObj, lc.getX(), lc.getZ(), true).get();
|
||||||
Chunk chunk = worldObj.getChunkAt(lc.getX(), lc.getZ());
|
Chunk chunk = worldObj.getChunkAt(lc.getX(), lc.getZ());
|
||||||
for (int layer = 0; layer < lc.baseblocks.length; layer++) {
|
for (int layer = 0; layer < lc.baseblocks.length; layer++) {
|
||||||
BaseBlock[] blocksLayer = lc.baseblocks[layer];
|
BaseBlock[] blocksLayer = lc.baseblocks[layer];
|
||||||
|
|
Loading…
Reference in a new issue