mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
fixed set block manager
This commit is contained in:
parent
430f4fca41
commit
9b20e096f0
@ -43,6 +43,7 @@ import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.titles.AbstractTitle;
|
||||
import com.intellectualcrafters.plot.titles.DefaultTitle;
|
||||
import com.intellectualcrafters.plot.util.AChunkManager;
|
||||
import com.intellectualcrafters.plot.util.AbstractSetBlock;
|
||||
import com.intellectualcrafters.plot.util.BlockManager;
|
||||
import com.intellectualcrafters.plot.util.ConsoleColors;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
@ -294,6 +295,7 @@ public class BukkitMain extends JavaPlugin implements Listener, IPlotMain {
|
||||
SetBlockManager.setBlockManager = new SetBlockSlow();
|
||||
}
|
||||
}
|
||||
AbstractSetBlock.setBlockManager = SetBlockManager.setBlockManager;
|
||||
try {
|
||||
new SendChunk();
|
||||
MainUtil.canSendChunk = true;
|
||||
|
@ -10,7 +10,6 @@ import com.intellectualcrafters.plot.util.AChunkManager;
|
||||
import com.intellectualcrafters.plot.util.BlockManager;
|
||||
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.bukkit.ChunkManager;
|
||||
import com.intellectualcrafters.plot.uuid.UUIDWrapper;
|
||||
|
||||
public interface IPlotMain {
|
||||
|
@ -54,9 +54,9 @@ import com.intellectualcrafters.plot.util.BlockManager;
|
||||
import com.intellectualcrafters.plot.util.ClusterManager;
|
||||
import com.intellectualcrafters.plot.util.ExpireManager;
|
||||
import com.intellectualcrafters.plot.util.Logger;
|
||||
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||
import com.intellectualcrafters.plot.util.Logger.LogLevel;
|
||||
import com.intellectualcrafters.plot.util.MainUtil;
|
||||
import com.intellectualcrafters.plot.util.SetupUtils;
|
||||
import com.intellectualcrafters.plot.util.TaskManager;
|
||||
import com.intellectualcrafters.plot.util.bukkit.UUIDHandler;
|
||||
import com.sk89q.worldedit.bukkit.WorldEditPlugin;
|
||||
|
@ -22,6 +22,7 @@ package com.intellectualcrafters.plot.commands;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
|
@ -85,7 +85,6 @@ import org.bukkit.event.world.WorldInitEvent;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
|
||||
import com.intellectualcrafters.plot.PlotSquared;
|
||||
import com.intellectualcrafters.plot.commands.Setup;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
|
@ -3,11 +3,10 @@ package com.intellectualcrafters.plot.util;
|
||||
import java.util.List;
|
||||
|
||||
import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
import com.intellectualcrafters.plot.util.bukkit.SetBlockManager;
|
||||
|
||||
public abstract class AbstractSetBlock {
|
||||
public static AbstractSetBlock setBlockManager = null;
|
||||
public static SetBlockManager setBlockManager = null;
|
||||
|
||||
public abstract boolean set(final org.bukkit.World world, final int x, final int y, final int z, final int blockId, final byte data);
|
||||
|
||||
public abstract void update(String world, List<ChunkLoc> chunks);
|
||||
public abstract void update(String worldname, List<ChunkLoc> chunkLocs);
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package com.intellectualcrafters.plot.util;
|
||||
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.PlotBlock;
|
||||
import com.intellectualcrafters.plot.util.bukkit.BukkitUtil;
|
||||
|
||||
public abstract class BlockManager {
|
||||
public static BlockManager manager;
|
||||
|
@ -5,7 +5,6 @@ import java.util.Map;
|
||||
|
||||
import com.intellectualcrafters.plot.object.PlotGenerator;
|
||||
import com.intellectualcrafters.plot.object.SetupObject;
|
||||
import com.intellectualcrafters.plot.util.bukkit.BukkitSetupUtils;
|
||||
|
||||
public abstract class SetupUtils {
|
||||
|
||||
|
@ -1,13 +1,28 @@
|
||||
package com.intellectualcrafters.plot.util.bukkit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.World;
|
||||
|
||||
public abstract class SetBlockManager {
|
||||
import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
import com.intellectualcrafters.plot.util.AbstractSetBlock;
|
||||
|
||||
public abstract class SetBlockManager extends AbstractSetBlock {
|
||||
public static SetBlockManager setBlockManager = null;
|
||||
|
||||
public abstract void set(final org.bukkit.World world, final int x, final int y, final int z, final int blockId, final byte data);
|
||||
|
||||
public abstract void update(List<Chunk> list);
|
||||
|
||||
@Override
|
||||
public void update(String worldname, List<ChunkLoc> chunkLocs) {
|
||||
World world = BukkitUtil.getWorld(worldname);
|
||||
ArrayList<Chunk> chunks = new ArrayList<Chunk>();
|
||||
for (ChunkLoc loc : chunkLocs) {
|
||||
chunks.add(world.getChunkAt(loc.x, loc.z));
|
||||
}
|
||||
setBlockManager.update(chunks);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user