}
protected void sendPacket() {
List<Player> players = world.getPlayers();
if (xCoords.size() > 6) {
SpoutPacket packet;
if (xCoords.size() > 128) {
int chunkX = xCoords.get(0) >> 4;
int chunkZ = zCoords.get(0) >> 4;
packet = new PacketCustomBlockChunkOverride(SpoutManager.getChunkDataManager().getCustomBlockIds(world, chunkX, chunkZ), SpoutManager.getChunkDataManager().getCustomBlockData(world, chunkX, chunkZ),chunkX, chunkZ);
} else {
packet = new PacketCustomMultiBlockOverride(xCoords, yCoords, zCoords, typeIds, data);
}
for (Player player : players) {
if (player instanceof SpoutCraftPlayer) {
SpoutCraftPlayer spc = (SpoutCraftPlayer) player;
if (spc.isSpoutCraftEnabled()) {
spc.sendPacket(packet);
}
}
}
} else {
for (int i = 0; i < xCoords.size(); i++) {
SpoutPacket packet = new PacketCustomBlockOverride(xCoords.get(i), yCoords.get(i), zCoords.get(i), typeIds.get(i), data.get(i));
for (Player player : players) {
if (player instanceof SpoutCraftPlayer) {
SpoutCraftPlayer spc = (SpoutCraftPlayer) player;
if (spc.isSpoutCraftEnabled()) {
spc.sendPacket(packet);