@Override public boolean overrideBlock(World world, int x, int y, int z, CustomBlock customBlock) { int blockId = customBlock.getCustomID(); int metaData = customBlock.getCustomMetaData(); SpoutManager.getChunkDataManager().setBlockData(blockIdString, world, x, y, z, blockId); SpoutManager.getChunkDataManager().setBlockData(metaDataString, world, x, y, z, metaData); Player[] players = world.getPlayers().toArray(new Player[0]); sendBlockOverrideToPlayers(players, new BlockVector(x, y, z), blockId, metaData); return true; }
@Override public boolean overrideBlock(Block block, CustomBlock customBlock) { block.setTypeId(customBlock.getRawId()); return overrideBlock(block, customBlock.getCustomID(), customBlock.getCustomMetaData()); }