diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java index f207ddbf5..5d8f53355 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/util/block/BukkitLocalQueue.java @@ -21,14 +21,14 @@ import org.bukkit.block.data.BlockData; import java.util.Locale; -public class BukkitLocalQueue extends BasicLocalBlockQueue { +public class BukkitLocalQueue extends BasicLocalBlockQueue { public BukkitLocalQueue(String world) { super(world); } - @Override public LocalChunk getLocalChunk(int x, int z) { - return (LocalChunk) new BasicLocalChunk(this, x, z) { + @Override public LocalChunk getLocalChunk(int x, int z) { + return new BasicLocalChunk(this, x, z) { // Custom stuff? }; } @@ -69,7 +69,7 @@ public class BukkitLocalQueue extends BasicLocalBlockQueue { } } - @Override public final void setComponents(LocalChunk lc) { + @Override public final void setComponents(LocalChunk lc) { setBaseBlocks(lc); } @@ -81,7 +81,7 @@ public class BukkitLocalQueue extends BasicLocalBlockQueue { return getBukkitWorld().getChunkAt(x, z); } - public void setBaseBlocks(LocalChunk lc) { + public void setBaseBlocks(LocalChunk lc) { World worldObj = Bukkit.getWorld(getWorld()); Chunk chunk = worldObj.getChunkAt(lc.getX(), lc.getZ()); chunk.load(true); @@ -152,7 +152,7 @@ public class BukkitLocalQueue extends BasicLocalBlockQueue { legacyPlotBlock.id == 0 || legacyPlotBlock.data == block.getData()); } - public void setBiomes(LocalChunk lc) { + public void setBiomes(LocalChunk lc) { if (lc.biomes != null) { World worldObj = Bukkit.getWorld(getWorld()); int bx = lc.getX() << 4; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java index fa137d463..551a9c44b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/util/block/BasicLocalBlockQueue.java @@ -15,7 +15,7 @@ import lombok.Getter; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedDeque; -public abstract class BasicLocalBlockQueue extends LocalBlockQueue { +public abstract class BasicLocalBlockQueue extends LocalBlockQueue { private final String world; private final ConcurrentHashMap blockChunks = new ConcurrentHashMap<>(); @@ -35,7 +35,7 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { @Override public abstract PlotBlock getBlock(int x, int y, int z); - public abstract void setComponents(LocalChunk lc); + public abstract void setComponents(LocalChunk lc); @Override public final String getWorld() { return world; @@ -62,7 +62,7 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { return false; } - public final boolean execute(final LocalChunk lc) { + public final boolean execute(final LocalChunk lc) { if (lc == null) { return false; } @@ -149,7 +149,7 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { return true; } - public final void setChunk(LocalChunk chunk) { + public final void setChunk(LocalChunk chunk) { LocalChunk previous = this.blockChunks.put(chunk.longHash(), chunk); if (previous != null) { chunks.remove(previous); @@ -169,7 +169,7 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { } - public abstract class LocalChunk { + public abstract class LocalChunk { public final BasicLocalBlockQueue parent; public final int z; public final int x; @@ -177,7 +177,7 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { public BaseBlock[][] baseblocks; public String[][] biomes; - public LocalChunk(BasicLocalBlockQueue parent, int x, int z) { + public LocalChunk(BasicLocalBlockQueue parent, int x, int z) { this.parent = parent; this.x = x; this.z = z; @@ -223,7 +223,7 @@ public abstract class BasicLocalBlockQueue extends LocalBlockQueue { } - public class BasicLocalChunk extends LocalChunk { + public class BasicLocalChunk extends LocalChunk { public BasicLocalChunk(BasicLocalBlockQueue parent, int x, int z) { super(parent, x, z); baseblocks = new BaseBlock[16][];